Dagger
Search

core

A utility module to query the Dagger core API directly from the CLI

Installation

dagger install github.com/shykes/daggerverse/core@v0.2.0

Entrypoint

Return Type
Core
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
func (m *myModule) example() *Core  {
	return dag.
			Core()
}
@function
def example() -> dag.Core:
	return (
		dag.core()
	)
@func()
example(): Core {
	return dag
		.core()
}

Types

Core 🔗

git() 🔗

Return Type
Git !
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git
func (m *myModule) example() *CoreGit  {
	return dag.
			Core().
			Git()
}
@function
def example() -> dag.CoreGit:
	return (
		dag.core()
		.git()
	)
@func()
example(): CoreGit {
	return dag
		.core()
		.git()
}

Git 🔗

Functions to interact with Git

load() 🔗

Load the state of git-related objects

Return Type
GitLoad !
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 load
func (m *myModule) example() *CoreGitLoad  {
	return dag.
			Core().
			Git().
			Load()
}
@function
def example() -> dag.CoreGitLoad:
	return (
		dag.core()
		.git()
		.load()
	)
@func()
example(): CoreGitLoad {
	return dag
		.core()
		.git()
		.load()
}

repository() 🔗

Query a remote git repository

Return Type
GitRepository !
Arguments
NameTypeDefault ValueDescription
urlString !-No description provided
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 repository --url string
func (m *myModule) example(url string) *CoreGitRepository  {
	return dag.
			Core().
			Git().
			Repository(url)
}
@function
def example(url: str) -> dag.CoreGitRepository:
	return (
		dag.core()
		.git()
		.repository(url)
	)
@func()
example(url: string): CoreGitRepository {
	return dag
		.core()
		.git()
		.repository(url)
}

GitLoad 🔗

repository() 🔗

Load the state of a remote git repository

Return Type
GitRepository !
Arguments
NameTypeDefault ValueDescription
stateString !-No description provided
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 load \
 repository --state string
func (m *myModule) example(state string) *CoreGitRepository  {
	return dag.
			Core().
			Git().
			Load().
			Repository(state)
}
@function
def example(state: str) -> dag.CoreGitRepository:
	return (
		dag.core()
		.git()
		.load()
		.repository(state)
	)
@func()
example(state: string): CoreGitRepository {
	return dag
		.core()
		.git()
		.load()
		.repository(state)
}

ref() 🔗

Load the state of a git ref

Return Type
GitRef !
Arguments
NameTypeDefault ValueDescription
stateString !-No description provided
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 load \
 ref --state string
func (m *myModule) example(state string) *CoreGitRef  {
	return dag.
			Core().
			Git().
			Load().
			Ref(state)
}
@function
def example(state: str) -> dag.CoreGitRef:
	return (
		dag.core()
		.git()
		.load()
		.ref(state)
	)
@func()
example(state: string): CoreGitRef {
	return dag
		.core()
		.git()
		.load()
		.ref(state)
}

GitRepository 🔗

save() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 repository --url string \
 save
func (m *myModule) example(ctx context.Context, url string) string  {
	return dag.
			Core().
			Git().
			Repository(url).
			Save(ctx)
}
@function
async def example(url: str) -> str:
	return await (
		dag.core()
		.git()
		.repository(url)
		.save()
	)
@func()
async example(url: string): Promise<string> {
	return dag
		.core()
		.git()
		.repository(url)
		.save()
}

ref() 🔗

Select a ref (tag or branch) in the repository

Return Type
GitRef !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 repository --url string \
 ref --name string
func (m *myModule) example(url string, name string) *CoreGitRef  {
	return dag.
			Core().
			Git().
			Repository(url).
			Ref(name)
}
@function
def example(url: str, name: str) -> dag.CoreGitRef:
	return (
		dag.core()
		.git()
		.repository(url)
		.ref(name)
	)
@func()
example(url: string, name: string): CoreGitRef {
	return dag
		.core()
		.git()
		.repository(url)
		.ref(name)
}

GitRef 🔗

A remote git ref (branch or tag)

name() 🔗

The name of the ref, for example “main” or “v0.1.0”

Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 repository --url string \
 ref --name string \
 name
func (m *myModule) example(ctx context.Context, url string, name string) string  {
	return dag.
			Core().
			Git().
			Repository(url).
			Ref(name).
			Name(ctx)
}
@function
async def example(url: str, name: str) -> str:
	return await (
		dag.core()
		.git()
		.repository(url)
		.ref(name)
		.name()
	)
@func()
async example(url: string, name: string): Promise<string> {
	return dag
		.core()
		.git()
		.repository(url)
		.ref(name)
		.name()
}

save() 🔗

Save the state of the git reference

Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 repository --url string \
 ref --name string \
 save
func (m *myModule) example(ctx context.Context, url string, name string) string  {
	return dag.
			Core().
			Git().
			Repository(url).
			Ref(name).
			Save(ctx)
}
@function
async def example(url: str, name: str) -> str:
	return await (
		dag.core()
		.git()
		.repository(url)
		.ref(name)
		.save()
	)
@func()
async example(url: string, name: string): Promise<string> {
	return dag
		.core()
		.git()
		.repository(url)
		.ref(name)
		.save()
}

tree() 🔗

Return Type
Directory !
Example
dagger -m github.com/shykes/daggerverse/core@296b20aacb683d2afe9a51a063f96b420d70f31b call \
 git \
 repository --url string \
 ref --name string \
 tree
func (m *myModule) example(url string, name string) *Directory  {
	return dag.
			Core().
			Git().
			Repository(url).
			Ref(name).
			Tree()
}
@function
def example(url: str, name: str) -> dagger.Directory:
	return (
		dag.core()
		.git()
		.repository(url)
		.ref(name)
		.tree()
	)
@func()
example(url: string, name: string): Directory {
	return dag
		.core()
		.git()
		.repository(url)
		.ref(name)
		.tree()
}