gopkg
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/MartinSimango/daggerverse/gopkg@v0.3.0Entrypoint
Return Type
GopkgExample
dagger -m github.com/MartinSimango/daggerverse/gopkg@f8848702f2ca8d78a2a24bbd9f6a6ad137c41da9 call \
func (m *MyModule) Example() *dagger.Gopkg  {
	return dag.
			Gopkg()
}@function
def example() -> dagger.Gopkg:
	return (
		dag.gopkg()
	)@func()
example(): Gopkg {
	return dag
		.gopkg()
}Types
Gopkg 🔗
gpgConfig() 🔗
Return Type
GitGpgConfig !Example
dagger -m github.com/MartinSimango/daggerverse/gopkg@f8848702f2ca8d78a2a24bbd9f6a6ad137c41da9 call \
 gpg-configfunc (m *MyModule) Example() *dagger.GopkgGitGpgConfig  {
	return dag.
			Gopkg().
			GpgConfig()
}@function
def example() -> dagger.GopkgGitGpgConfig:
	return (
		dag.gopkg()
		.gpg_config()
	)@func()
example(): GopkgGitGpgConfig {
	return dag
		.gopkg()
		.gpgConfig()
}test() 🔗
Test the project
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory | - | Source directory for the project | 
Example
dagger -m github.com/MartinSimango/daggerverse/gopkg@f8848702f2ca8d78a2a24bbd9f6a6ad137c41da9 call \
 testfunc (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Gopkg().
			Test(ctx)
}@function
async def example() -> str:
	return await (
		dag.gopkg()
		.test()
	)@func()
async example(): Promise<string> {
	return dag
		.gopkg()
		.test()
}release() 🔗
Release a new version of the project using semantic-release
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory | - | Source directory for the project | 
| token | Secret ! | - | GitHub token for the release | 
| dryRun | Boolean | true | Dry run the release | 
Example
dagger -m github.com/MartinSimango/daggerverse/gopkg@f8848702f2ca8d78a2a24bbd9f6a6ad137c41da9 call \
 release --token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, token *dagger.Secret) string  {
	return dag.
			Gopkg().
			Release(ctxtoken)
}@function
async def example(token: dagger.Secret) -> str:
	return await (
		dag.gopkg()
		.release(token)
	)@func()
async example(token: Secret): Promise<string> {
	return dag
		.gopkg()
		.release(token)
}gopkgFlow() 🔗
GopkgFlow runs a release flow for a Go project using semantic-release This runs the following steps: 1. Test the project 2. Release a new version of the project using semantic-release
Return Type
String !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory | - | Source directory for the project | 
| token | Secret ! | - | GitHub token for the release | 
| dryRun | Boolean | true | Dry run the release | 
Example
dagger -m github.com/MartinSimango/daggerverse/gopkg@f8848702f2ca8d78a2a24bbd9f6a6ad137c41da9 call \
 gopkg-flow --token env:MYSECRETfunc (m *MyModule) Example(ctx context.Context, token *dagger.Secret) string  {
	return dag.
			Gopkg().
			GopkgFlow(ctxtoken)
}@function
async def example(token: dagger.Secret) -> str:
	return await (
		dag.gopkg()
		.gopkg_flow(token)
	)@func()
async example(token: Secret): Promise<string> {
	return dag
		.gopkg()
		.gopkgFlow(token)
}withGitGpgConfig() 🔗
WithGitGpgConfig sets the GPG configuration for the git repository. To be used with Release.
Return Type
Gopkg !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| gpgKey | Secret ! | - | GPG private key for signing the semantic-release bot | 
| gpgKeyId | Secret ! | - | GPG key ID | 
| gpgPassword | Secret | - | GPG password for the private key, if any | 
| gitAuthorName | String ! | - | Git author name for the release commits | 
| gitAuthorEmail | String ! | - | Git author email for the release commits | 
Example
dagger -m github.com/MartinSimango/daggerverse/gopkg@f8848702f2ca8d78a2a24bbd9f6a6ad137c41da9 call \
 with-git-gpg-config --gpg-key env:MYSECRET --gpg-key-id env:MYSECRET --git-author-name string --git-author-email stringfunc (m *MyModule) Example(gpgKey *dagger.Secret, gpgKeyId *dagger.Secret, gitAuthorName string, gitAuthorEmail string) *dagger.Gopkg  {
	return dag.
			Gopkg().
			WithGitGpgConfig(gpgKey, gpgKeyId, gitAuthorName, gitAuthorEmail)
}@function
def example(gpg_key: dagger.Secret, gpg_key_id: dagger.Secret, git_author_name: str, git_author_email: str) -> dagger.Gopkg:
	return (
		dag.gopkg()
		.with_git_gpg_config(gpg_key, gpg_key_id, git_author_name, git_author_email)
	)@func()
example(gpgKey: Secret, gpgKeyId: Secret, gitAuthorName: string, gitAuthorEmail: string): Gopkg {
	return dag
		.gopkg()
		.withGitGpgConfig(gpgKey, gpgKeyId, gitAuthorName, gitAuthorEmail)
}GitGpgConfig 🔗
gpgKey() 🔗
Return Type
Secret !Example
Function GopkgGitGpgConfig.gpgKey is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgKey is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgKey is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgKey is not accessible from the gopkg modulegpgKeyId() 🔗
Return Type
Secret !Example
Function GopkgGitGpgConfig.gpgKeyId is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgKeyId is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgKeyId is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgKeyId is not accessible from the gopkg modulegpgPassword() 🔗
Return Type
Secret !Example
Function GopkgGitGpgConfig.gpgPassword is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgPassword is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgPassword is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gpgPassword is not accessible from the gopkg modulegitAuthorName() 🔗
Return Type
String !Example
Function GopkgGitGpgConfig.gitAuthorName is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gitAuthorName is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gitAuthorName is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gitAuthorName is not accessible from the gopkg modulegitAuthorEmail() 🔗
Return Type
String !Example
Function GopkgGitGpgConfig.gitAuthorEmail is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gitAuthorEmail is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gitAuthorEmail is not accessible from the gopkg moduleFunction GopkgGitGpgConfig.gitAuthorEmail is not accessible from the gopkg module