Dagger
Search

git

This module has been generated via dagger init and serves as a reference to
basic 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/disaster37/dagger-library-go/git@v0.0.22

Entrypoint

Return Type
Git !
Arguments
NameTypeDescription
baseContainerContainer base container
Example
dagger -m github.com/disaster37/dagger-library-go/git@7afdfdec8ce0ea80656b0d01faed2baa9c19e34a call \
func (m *myModule) example() *Git  {
	return dag.
			Git()
}
@function
def example() -> dag.Git:
	return (
		dag.git()
	)
@func()
example(): Git {
	return dag
		.git()
}

Types

Git 🔗

baseContainer() 🔗

Return Type
Container !
Example
dagger -m github.com/disaster37/dagger-library-go/git@7afdfdec8ce0ea80656b0d01faed2baa9c19e34a call \
 base-container
func (m *myModule) example() *Container  {
	return dag.
			Git().
			BaseContainer()
}
@function
def example() -> dagger.Container:
	return (
		dag.git()
		.base_container()
	)
@func()
example(): Container {
	return dag
		.git()
		.baseContainer()
}

getBaseContainer() 🔗

BaseContainer permit to get the base container

Return Type
Container !
Example
dagger -m github.com/disaster37/dagger-library-go/git@7afdfdec8ce0ea80656b0d01faed2baa9c19e34a call \
 get-base-container
func (m *myModule) example() *Container  {
	return dag.
			Git().
			GetBaseContainer()
}
@function
def example() -> dagger.Container:
	return (
		dag.git()
		.get_base_container()
	)
@func()
example(): Container {
	return dag
		.git()
		.getBaseContainer()
}

setConfig() 🔗

SetConfig permit to set git config

Return Type
Git !
Arguments
NameTypeDefault ValueDescription
usernameString !-The git username
emailString !-The git email
baseRepoUrlString "github.com"The git base repo URL
tokenSecret -The git token
Example
dagger -m github.com/disaster37/dagger-library-go/git@7afdfdec8ce0ea80656b0d01faed2baa9c19e34a call \
 set-config --username string --email string
func (m *myModule) example(username string, email string) *Git  {
	return dag.
			Git().
			SetConfig(username, email)
}
@function
def example(username: str, email: str) -> dag.Git:
	return (
		dag.git()
		.set_config(username, email)
	)
@func()
example(username: string, email: string): Git {
	return dag
		.git()
		.setConfig(username, email)
}

setRepo() 🔗

SetRepo permit to set git repo

Return Type
Git !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-the source directory
branchString !"main"The git email
Example
dagger -m github.com/disaster37/dagger-library-go/git@7afdfdec8ce0ea80656b0d01faed2baa9c19e34a call \
 set-repo --source DIR_PATH --branch string
func (m *myModule) example(source *Directory, branch string) *Git  {
	return dag.
			Git().
			SetRepo(source, branch)
}
@function
def example(source: dagger.Directory, branch: str) -> dag.Git:
	return (
		dag.git()
		.set_repo(source, branch)
	)
@func()
example(source: Directory, branch: string): Git {
	return dag
		.git()
		.setRepo(source, branch)
}

commitAndPush() 🔗

CommitAndPush permit to commit and push

Return Type
String !
Arguments
NameTypeDefault ValueDescription
messageString !-The commit message
Example
dagger -m github.com/disaster37/dagger-library-go/git@7afdfdec8ce0ea80656b0d01faed2baa9c19e34a call \
 commit-and-push --message string
func (m *myModule) example(ctx context.Context, message string) string  {
	return dag.
			Git().
			CommitAndPush(ctx, message)
}
@function
async def example(message: str) -> str:
	return await (
		dag.git()
		.commit_and_push(message)
	)
@func()
async example(message: string): Promise<string> {
	return dag
		.git()
		.commitAndPush(message)
}