GoAppResource
Handle
interface GoAppResource extends IComputeResource, IContainerFilesDestinationResource, IResource, IResourceWithArgs, IResourceWithEndpoints, IResourceWithEnvironment, IResourceWithProbes, IResourceWithWaitSupport, IResourceWithServiceDiscovery { readonly resourceTypeDisplayName: string; withAppArgs(args: any[]): GoAppResource; withDelveServer(options?: DelveServerOptions): GoAppResource; withGoPrivate( privatePatterns: string[], authHost: string, usernameArgName?: string, tokenSecretId?: string): GoAppResource; withModDownload(): GoAppResource; withModTidy(): GoAppResource; withModVendor(): GoAppResource; withVetTool(): GoAppResource;}8 members
Properties
property
resourceTypeDisplayName stringgetGets the ResourceTypeDisplayName property
Methods
Passes extra arguments to the Go program at runtime. In normal run mode they appear after `go run .`; in Delve mode after the `--` separator.
withAppArgs(args: any[]): GoAppResourceParameters
argsany[]The program arguments (e.g., `"serve"`, `"--config"`, `"prod.yaml"`).Returns
GoAppResource Starts a configurable headless Delve debug server so that DAP-compatible clients can attach remotely. The application is launched with `dlv debug` instead of `go run`. Delve must be available on the PATH.
withDelveServer(options?: DelveServerOptions): GoAppResourceParameters
optionsDelveServerOptions optionalThe options that configure the Delve server. When `null`, the default options are used.Returns
GoAppResource Configures private Go module authentication for publish-time Dockerfile generation.
withGoPrivate( privatePatterns: string[], authHost: string, usernameArgName?: string, tokenSecretId?: string): GoAppResourceParameters
privatePatterns string[]One or more module path patterns that should bypass the public proxy and checksum database, e.g. `"*.mycompany.com"` or `"github.com/myorg"`. Passed verbatim to `GOPRIVATE`, which implicitly covers `GONOSUMCHECK` and `GONOPROXY`.authHost stringThe Git host that requires authentication, e.g. `"github.com"`.usernameArgName stringoptional= GIT_USERThe Docker build-arg name for the Git username. Defaults to `"GIT_USER"`. Pass it at build time with `--build-arg GIT_USER=myuser`.tokenSecretId stringoptional= gittokenThe BuildKit secret ID for the Git access token. Defaults to `"gittoken"`. Pass it at build time with `--secret id=gittoken,src=/path/to/token`.Returns
GoAppResource Runs `go mod download` before starting the application, pre-fetching all module dependencies into the local module cache without modifying `go.sum`. The main application waits for the download step to complete successfully before launching.
withModDownload(): GoAppResourceReturns
GoAppResource Runs `go mod tidy` before starting the application, ensuring `go.sum` is up to date. The main application waits for the tidy step to complete successfully before launching.
withModTidy(): GoAppResourceReturns
GoAppResource Runs `go mod vendor` before starting the application, caching all module dependencies in the local `vendor/` directory. The main application waits for the vendor step to complete successfully before launching.
withModVendor(): GoAppResourceReturns
GoAppResource Runs `go vet ./...` before starting the application to catch static analysis issues. The main application waits for the vet step to complete successfully before launching.
withVetTool(): GoAppResourceReturns
GoAppResource