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.3.0

Entrypoint

Return Type
Core
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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 🔗

fs() 🔗

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

git() 🔗

Return Type
Git !
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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()
}

Fs 🔗

load() 🔗

Return Type
Fsload !
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd call \
 fs \
 load
func (m *myModule) example() *CoreFsload  {
	return dag.
			Core().
			Fs().
			Load()
}
@function
def example() -> dag.CoreFsload:
	return (
		dag.core()
		.fs()
		.load()
	)
@func()
example(): CoreFsload {
	return dag
		.core()
		.fs()
		.load()
}

directory() 🔗

Initialize a new directory

Return Type
Directory !
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd call \
 fs \
 directory
func (m *myModule) example() *CoreDirectory  {
	return dag.
			Core().
			Fs().
			Directory()
}
@function
def example() -> dag.CoreDirectory:
	return (
		dag.core()
		.fs()
		.directory()
	)
@func()
example(): CoreDirectory {
	return dag
		.core()
		.fs()
		.directory()
}

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@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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 !-URL of the git repository. Can be formatted as https://{host}/{owner}/{repo}, git@{host}:{owner}/{repo}. Suffix ".git" is optional.
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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)
}

Fsload 🔗

directory() 🔗

Load a snapshot from a previously saved directory

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
snapshotString !-The directory snapshot to load
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd call \
 fs \
 load \
 directory --snapshot string
func (m *myModule) example(snapshot string) *CoreDirectory  {
	return dag.
			Core().
			Fs().
			Load().
			Directory(snapshot)
}
@function
def example(snapshot: str) -> dag.CoreDirectory:
	return (
		dag.core()
		.fs()
		.load()
		.directory(snapshot)
	)
@func()
example(snapshot: string): CoreDirectory {
	return dag
		.core()
		.fs()
		.load()
		.directory(snapshot)
}

Directory 🔗

save() 🔗

Save a snapshot of the directory state

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

entries() 🔗

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

GitLoad 🔗

repository() 🔗

Load the state of a remote git repository

Return Type
GitRepository !
Arguments
NameTypeDefault ValueDescription
stateString !-The state of the git repository
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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 !-The state of the git ref
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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 !-The name of the branch
Example
dagger -m github.com/shykes/daggerverse/core@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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@ad39bc977bfd41de248257ba75f863fdb3dcdccd 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@ad39bc977bfd41de248257ba75f863fdb3dcdccd call \
 git \
 repository --url string \
 ref --name string \
 tree
func (m *myModule) example(url string, name string) *CoreDirectory  {
	return dag.
			Core().
			Git().
			Repository(url).
			Ref(name).
			Tree()
}
@function
def example(url: str, name: str) -> dag.CoreDirectory:
	return (
		dag.core()
		.git()
		.repository(url)
		.ref(name)
		.tree()
	)
@func()
example(url: string, name: string): CoreDirectory {
	return dag
		.core()
		.git()
		.repository(url)
		.ref(name)
		.tree()
}