supercore
A utility module to query the Dagger core API directly from the CLI
Installation
dagger install github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0
Entrypoint
Return Type
Supercore
Example
func (m *myModule) example() *Supercore {
return dag.
Supercore()
}
@function
def example() -> dag.Supercore:
return (
dag.supercore()
)
@func()
example(): Supercore {
return dag
.supercore()
}
Types
Supercore
fs()
Return Type
Fs !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
fs \
directory \
save
func (m *myModule) example() *SupercoreFs {
return dag.
Supercore().
Fs()
}
@function
def example() -> dag.SupercoreFs:
return (
dag.supercore()
.fs()
)
@func()
example(): SupercoreFs {
return dag
.supercore()
.fs()
}
git()
Return Type
Git !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
save
func (m *myModule) example() *SupercoreGit {
return dag.
Supercore().
Git()
}
@function
def example() -> dag.SupercoreGit:
return (
dag.supercore()
.git()
)
@func()
example(): SupercoreGit {
return dag
.supercore()
.git()
}
Fs
load()
Return Type
Fsload !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
fs \
load \
directory --snapshot string \
save
func (m *myModule) example() *SupercoreFsload {
return dag.
Supercore().
Fs().
Load()
}
@function
def example() -> dag.SupercoreFsload:
return (
dag.supercore()
.fs()
.load()
)
@func()
example(): SupercoreFsload {
return dag
.supercore()
.fs()
.load()
}
directory()
Initialize a new directory
Return Type
CoreDirectory !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
fs \
directory \
save
func (m *myModule) example() *SupercoreCoreDirectory {
return dag.
Supercore().
Fs().
Directory()
}
@function
def example() -> dag.SupercoreCoreDirectory:
return (
dag.supercore()
.fs()
.directory()
)
@func()
example(): SupercoreCoreDirectory {
return dag
.supercore()
.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/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
load \
repository --state string \
save
func (m *myModule) example() *SupercoreGitLoad {
return dag.
Supercore().
Git().
Load()
}
@function
def example() -> dag.SupercoreGitLoad:
return (
dag.supercore()
.git()
.load()
)
@func()
example(): SupercoreGitLoad {
return dag
.supercore()
.git()
.load()
}
repository()
Query a remote git repository
Return Type
CoreGitRepository !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
url | String ! | - | 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/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
save
func (m *myModule) example(url string) *SupercoreCoreGitRepository {
return dag.
Supercore().
Git().
Repository(url)
}
@function
def example(url: str) -> dag.SupercoreCoreGitRepository:
return (
dag.supercore()
.git()
.repository(url)
)
@func()
example(url: string): SupercoreCoreGitRepository {
return dag
.supercore()
.git()
.repository(url)
}
Fsload
directory()
Load a snapshot from a previously saved directory
Return Type
CoreDirectory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
snapshot | String ! | - | The directory snapshot to load |
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
fs \
load \
directory --snapshot string \
save
func (m *myModule) example(snapshot string) *SupercoreCoreDirectory {
return dag.
Supercore().
Fs().
Load().
Directory(snapshot)
}
@function
def example(snapshot: str) -> dag.SupercoreCoreDirectory:
return (
dag.supercore()
.fs()
.load()
.directory(snapshot)
)
@func()
example(snapshot: string): SupercoreCoreDirectory {
return dag
.supercore()
.fs()
.load()
.directory(snapshot)
}
CoreDirectory
save()
Save a snapshot of the directory state
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
ref --name string \
tree \
save
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Supercore().
Git().
Repository(url).
Ref(name).
Tree().
Save(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.supercore()
.git()
.repository(url)
.ref(name)
.tree()
.save()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.supercore()
.git()
.repository(url)
.ref(name)
.tree()
.save()
}
entries()
Return Type
[String ! ] !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
ref --name string \
tree \
entries
func (m *myModule) example(ctx context.Context, url string, name string) []string {
return dag.
Supercore().
Git().
Repository(url).
Ref(name).
Tree().
Entries(ctx)
}
@function
async def example(url: str, name: str) -> List[str]:
return await (
dag.supercore()
.git()
.repository(url)
.ref(name)
.tree()
.entries()
)
@func()
async example(url: string, name: string): Promise<string[]> {
return dag
.supercore()
.git()
.repository(url)
.ref(name)
.tree()
.entries()
}
GitLoad
repository()
Load the state of a remote git repository
Return Type
CoreGitRepository !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
state | String ! | - | The state of the git repository |
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
load \
repository --state string \
save
func (m *myModule) example(state string) *SupercoreCoreGitRepository {
return dag.
Supercore().
Git().
Load().
Repository(state)
}
@function
def example(state: str) -> dag.SupercoreCoreGitRepository:
return (
dag.supercore()
.git()
.load()
.repository(state)
)
@func()
example(state: string): SupercoreCoreGitRepository {
return dag
.supercore()
.git()
.load()
.repository(state)
}
ref()
Load the state of a git ref
Return Type
CoreGitRef !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
state | String ! | - | The state of the git ref |
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
load \
ref --state string \
save
func (m *myModule) example(state string) *SupercoreCoreGitRef {
return dag.
Supercore().
Git().
Load().
Ref(state)
}
@function
def example(state: str) -> dag.SupercoreCoreGitRef:
return (
dag.supercore()
.git()
.load()
.ref(state)
)
@func()
example(state: string): SupercoreCoreGitRef {
return dag
.supercore()
.git()
.load()
.ref(state)
}
CoreGitRepository
save()
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
save
func (m *myModule) example(ctx context.Context, url string) string {
return dag.
Supercore().
Git().
Repository(url).
Save(ctx)
}
@function
async def example(url: str) -> str:
return await (
dag.supercore()
.git()
.repository(url)
.save()
)
@func()
async example(url: string): Promise<string> {
return dag
.supercore()
.git()
.repository(url)
.save()
}
ref()
Select a ref (tag or branch) in the repository
Return Type
CoreGitRef !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | The name of the branch |
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
ref --name string \
save
func (m *myModule) example(url string, name string) *SupercoreCoreGitRef {
return dag.
Supercore().
Git().
Repository(url).
Ref(name)
}
@function
def example(url: str, name: str) -> dag.SupercoreCoreGitRef:
return (
dag.supercore()
.git()
.repository(url)
.ref(name)
)
@func()
example(url: string, name: string): SupercoreCoreGitRef {
return dag
.supercore()
.git()
.repository(url)
.ref(name)
}
CoreGitRef
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/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
ref --name string \
name
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Supercore().
Git().
Repository(url).
Ref(name).
Name(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.supercore()
.git()
.repository(url)
.ref(name)
.name()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.supercore()
.git()
.repository(url)
.ref(name)
.name()
}
save()
Save the state of the git reference
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
ref --name string \
save
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Supercore().
Git().
Repository(url).
Ref(name).
Save(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.supercore()
.git()
.repository(url)
.ref(name)
.save()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.supercore()
.git()
.repository(url)
.ref(name)
.save()
}
tree()
Return Type
CoreDirectory !
Example
dagger -m github.com/shykes/daggerverse/supercore@3338120927f8e291c4780de691ef63a7c9d825c0 call \
git \
repository --url string \
ref --name string \
tree \
save
func (m *myModule) example(url string, name string) *SupercoreCoreDirectory {
return dag.
Supercore().
Git().
Repository(url).
Ref(name).
Tree()
}
@function
def example(url: str, name: str) -> dag.SupercoreCoreDirectory:
return (
dag.supercore()
.git()
.repository(url)
.ref(name)
.tree()
)
@func()
example(url: string, name: string): SupercoreCoreDirectory {
return dag
.supercore()
.git()
.repository(url)
.ref(name)
.tree()
}