Dagger
Search

gopublisher

No long description provided.

Installation

dagger install github.com/Excoriate/daggerverse/gopublisher@v1.15.4

Entrypoint

Return Type
Gopublisher !
Arguments
NameTypeDescription
versionString version is the version of Go that the publisher module will use, e.g., "1.22.0".
Example
func (m *myModule) example() *Gopublisher  {
	return dag.
			Gopublisher()
}
@function
def example() -> dag.Gopublisher:
	return (
		dag.gopublisher()
	)
@func()
example(): Gopublisher {
	return dag
		.gopublisher()
}

Types

Gopublisher 🔗

src() 🔗

Src is the directory that contains all the source code, including the module directory. It represents the source code directory.

Return Type
Directory !
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 src
func (m *myModule) example() *Directory  {
	return dag.
			Gopublisher().
			Src()
}
@function
def example() -> dagger.Directory:
	return (
		dag.gopublisher()
		.src()
	)
@func()
example(): Directory {
	return dag
		.gopublisher()
		.src()
}

ctr() 🔗

Ctr is the container to use as a base container for gopublisher, if it’s passed, it’s used as the base container.

Return Type
Container !
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 ctr
func (m *myModule) example() *Container  {
	return dag.
			Gopublisher().
			Ctr()
}
@function
def example() -> dagger.Container:
	return (
		dag.gopublisher()
		.ctr()
	)
@func()
example(): Container {
	return dag
		.gopublisher()
		.ctr()
}

base() 🔗

Base sets the base container for gopublisher.

It sets the base container for the gopublisher module. It’s meant to be used as a base container for the module. Arguments: - imageURL: The URL of the image to use as the base container. Returns: - *Gopublisher: The Gopublisher module with the base container set.

Return Type
Gopublisher !
Arguments
NameTypeDefault ValueDescription
imageUrlString !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 base --image-url string \
 go-mod-path --src DIR_PATH
func (m *myModule) example(imageUrl string) *Gopublisher  {
	return dag.
			Gopublisher().
			Base(imageUrl)
}
@function
def example(image_url: str) -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.base(image_url)
	)
@func()
example(imageUrl: string): Gopublisher {
	return dag
		.gopublisher()
		.base(imageUrl)
}

withEnvVariable() 🔗

WithEnvVariable sets an environment variable.

The name of the environment variable (e.g., “HOST”).

The value of the environment variable (e.g., “localhost”).

Replace ${VAR} or \(VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:\)PATH”). +optional

Return Type
Gopublisher !
Arguments
NameTypeDefault ValueDescription
nameString !-The name of the environment variable (e.g., "HOST").
valueString !-The value of the environment variable (e.g., "localhost").
expandBoolean -Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 with-env-variable --name string --value string \
 go-mod-path --src DIR_PATH
func (m *myModule) example(name string, value string) *Gopublisher  {
	return dag.
			Gopublisher().
			WithEnvVariable(name, value)
}
@function
def example(name: str, value: str) -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.with_env_variable(name, value)
	)
@func()
example(name: string, value: string): Gopublisher {
	return dag
		.gopublisher()
		.withEnvVariable(name, value)
}

withCgodisabled() 🔗

WithCGODisabled sets the CGO_ENABLED environment variable to 0.

It sets the CGO_ENABLED environment variable to 0.

Return Type
Gopublisher !
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 with-cgodisabled \
 go-mod-path --src DIR_PATH
func (m *myModule) example() *Gopublisher  {
	return dag.
			Gopublisher().
			WithCgodisabled()
}
@function
def example() -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.with_cgodisabled()
	)
@func()
example(): Gopublisher {
	return dag
		.gopublisher()
		.withCgodisabled()
}

withGit() 🔗

WithGit installs or setup the container with the git binary.

It installs or sets up the container with the git binary.

Return Type
Gopublisher !
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 with-git \
 go-mod-path --src DIR_PATH
func (m *myModule) example() *Gopublisher  {
	return dag.
			Gopublisher().
			WithGit()
}
@function
def example() -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.with_git()
	)
@func()
example(): Gopublisher {
	return dag
		.gopublisher()
		.withGit()
}

withCurl() 🔗

WithCURL installs or setup the container with the curl binary.

It installs or sets up the container with the curl binary.

Return Type
Gopublisher !
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 with-curl \
 go-mod-path --src DIR_PATH
func (m *myModule) example() *Gopublisher  {
	return dag.
			Gopublisher().
			WithCurl()
}
@function
def example() -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.with_curl()
	)
@func()
example(): Gopublisher {
	return dag
		.gopublisher()
		.withCurl()
}

withSource() 🔗

WithSource sets the source directory.

The source directory is the directory that contains all the source code, including the module directory.

Return Type
Gopublisher !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the directory that contains all the source code, including the module directory.
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 with-source --src DIR_PATH \
 go-mod-path --src DIR_PATH
func (m *myModule) example(src *Directory) *Gopublisher  {
	return dag.
			Gopublisher().
			WithSource(src)
}
@function
def example(src: dagger.Directory) -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.with_source(src)
	)
@func()
example(src: Directory): Gopublisher {
	return dag
		.gopublisher()
		.withSource(src)
}

withEnvVarsFromStrs() 🔗

WithEnvVarsFromStrs sets the environment variables for the container.

It sets the environment variables for the container. It’s meant to be used as a terminal for the module. Arguments: - envVars: A set of strings (e.g., “KEY=value,KEY=value”) to use as environment variables. They’re used to set the environment variables for the container when it’s required to pass multiple environment variables in a single argument. E.g.: “GITHUB=token,GO_VERSION=1.22.0,MYVAR=myvar”

Return Type
Gopublisher !
Arguments
NameTypeDefault ValueDescription
envVars[String ! ] !-No description provided
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 with-env-vars-from-strs --env-vars string1 --env-vars string2 \
 go-mod-path --src DIR_PATH
func (m *myModule) example(envVars []string) *Gopublisher  {
	return dag.
			Gopublisher().
			WithEnvVarsFromStrs(envVars)
}
@function
def example(env_vars: List[str]) -> dag.Gopublisher:
	return (
		dag.gopublisher()
		.with_env_vars_from_strs(env_vars)
	)
@func()
example(envVars: string[]): Gopublisher {
	return dag
		.gopublisher()
		.withEnvVarsFromStrs(envVars)
}

terminal() 🔗

Terminal returns a terminal for the container.

It returns a terminal for the container. It’s meant to be used as a terminal for the module. Arguments: - None. Returns: - *Terminal: The terminal for the container.

Return Type
Terminal !
Arguments
NameTypeDefault ValueDescription
srcDirectory -src is the directory that contains all the source code, including the module directory.
envVars[String ! ] -envVars is a set of strings (e.g., "KEY=value,KEY=value") to use as environment variables. They're used to set the environment variables for the container when it's required to pass multiple environment variables in a single argument. E.g.: "GITHUB_TOKEN=token,GO_VERSION=1.22.0,MYVAR=myvar"
Example
Function Gopublisher.terminal is not accessible from the gopublisher module
func (m *myModule) example() *Terminal  {
	return dag.
			Gopublisher().
			Terminal()
}
@function
def example() -> dag.Terminal:
	return (
		dag.gopublisher()
		.terminal()
	)
@func()
example(): Terminal {
	return dag
		.gopublisher()
		.terminal()
}

goModPath() 🔗

GoModPath returns the module path.

It returns the module path. It’s meant to be used as a terminal for the module. Arguments: - src: The directory that contains all the source code, including the module directory. Returns: - string: The module path.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the directory that contains all the source code, including the module directory.
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 go-mod-path --src DIR_PATH
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Gopublisher().
			GoModPath(ctx, src)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.gopublisher()
		.go_mod_path(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.gopublisher()
		.goModPath(src)
}

goModVersion() 🔗

GoModVersion returns the module version by running git describe –tags –abbrev=0.

It returns the module version by running git describe –tags –abbrev=0. It’s meant to be used as a terminal for the module. Arguments: - src: The directory that contains all the source code, including the module directory. Returns: - string: The module version.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the directory that contains all the source code, including the module directory.
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 go-mod-version --src DIR_PATH
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Gopublisher().
			GoModVersion(ctx, src)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.gopublisher()
		.go_mod_version(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.gopublisher()
		.goModVersion(src)
}

goModPublish() 🔗

GoModPublish publishes the module to the registry.

It publishes the module to the registry. It’s meant to be used as a terminal for the module. Arguments: - src: The directory that contains all the source code, including the module directory. - tag: The tag to use for the release. Returns: - string: The tag that was used for the release. - error: An error that occurred while publishing the module.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-src is the directory that contains all the source code, including the module directory.
tagString -tag is the tag to use for the release.
githubTokenString -githubToken is the GitHub token to use for the release. It's required when publishing from GitHub Actions.
envVars[String ! ] -envVars is a set of strings (e.g., "KEY=value,KEY=value") to use as environment variables. They're used to set the environment variables for the container when it's required to pass multiple environment variables in a single argument. E.g.: "GITHUB_TOKEN=token,GO_VERSION=1.22.0,MYVAR=myvar"
Example
dagger -m github.com/Excoriate/daggerverse/gopublisher@9987052c010bcbdda3b4c148c2e7b3fe73817f91 call \
 go-mod-publish --src DIR_PATH
func (m *myModule) example(ctx context.Context, src *Directory) string  {
	return dag.
			Gopublisher().
			GoModPublish(ctx, src)
}
@function
async def example(src: dagger.Directory) -> str:
	return await (
		dag.gopublisher()
		.go_mod_publish(src)
	)
@func()
async example(src: Directory): Promise<string> {
	return dag
		.gopublisher()
		.goModPublish(src)
}