Packages
dagger
0.13.2
0.21.7
0.21.6
0.21.5
0.21.4
0.21.3
0.21.2
0.21.1
0.21.0
0.20.8
0.20.7
0.20.6
0.20.5
0.20.4
0.20.3
0.20.2
0.20.1
0.20.0
0.19.11
0.19.10
0.19.9
0.19.8
0.19.7
0.19.6
0.19.5
0.19.4
0.19.3
0.19.2
0.19.1
0.19.0
0.18.19
0.18.18
0.18.17
0.18.16
0.18.15
0.18.14
0.18.13
0.18.12
0.18.11
0.18.10
0.18.9
0.18.8
0.18.7
0.18.5
0.18.4
0.18.3
0.18.2
0.18.1
0.18.0
0.17.2
0.17.1
0.17.0
0.16.3
0.16.2
0.16.1
0.16.0
0.15.4
0.15.3
0.15.2
0.15.1
0.15.0
0.14.0
0.13.7
0.13.6
0.13.5
0.13.4
0.13.3
0.13.2
0.13.1
0.13.0
0.12.7
0.12.6
0.12.5
0.12.4
0.12.3
0.12.2
0.12.1
0.12.0
0.11.9
0.11.8
0.11.7
0.11.6
0.11.5
0.11.4
0.11.3
0.11.2
0.11.1
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.11
0.9.10
0.9.9
0.9.8
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.8
0.8.7
0.8.6
0.8.5
0.8.4
0.8.2
0.0.0
retired
Dagger SDK for Elixir
Current section
Files
Jump to
Current section
Files
lib/dagger/gen/git_module_source.ex
# This file generated by `dagger_codegen`. Please DO NOT EDIT.
defmodule Dagger.GitModuleSource do
@moduledoc "Module source originating from a git repo."
alias Dagger.Core.Client
alias Dagger.Core.QueryBuilder, as: QB
@derive Dagger.ID
defstruct [:query_builder, :client]
@type t() :: %__MODULE__{}
@doc "The ref to clone the root of the git repo from"
@spec clone_ref(t()) :: {:ok, String.t()} | {:error, term()}
def clone_ref(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("cloneRef")
Client.execute(git_module_source.client, query_builder)
end
@doc "The resolved commit of the git repo this source points to."
@spec commit(t()) :: {:ok, String.t()} | {:error, term()}
def commit(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("commit")
Client.execute(git_module_source.client, query_builder)
end
@doc "The directory containing everything needed to load load and use the module."
@spec context_directory(t()) :: Dagger.Directory.t()
def context_directory(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("contextDirectory")
%Dagger.Directory{
query_builder: query_builder,
client: git_module_source.client
}
end
@doc "The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket)"
@spec html_repo_url(t()) :: {:ok, String.t()} | {:error, term()}
def html_repo_url(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("htmlRepoURL")
Client.execute(git_module_source.client, query_builder)
end
@doc "The URL to the source's git repo in a web browser"
@spec html_url(t()) :: {:ok, String.t()} | {:error, term()}
def html_url(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("htmlURL")
Client.execute(git_module_source.client, query_builder)
end
@doc "A unique identifier for this GitModuleSource."
@spec id(t()) :: {:ok, Dagger.GitModuleSourceID.t()} | {:error, term()}
def id(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("id")
Client.execute(git_module_source.client, query_builder)
end
@doc "The clean module name of the root of the module"
@spec root(t()) :: {:ok, String.t()} | {:error, term()}
def root(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("root")
Client.execute(git_module_source.client, query_builder)
end
@doc "The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory)."
@spec root_subpath(t()) :: {:ok, String.t()} | {:error, term()}
def root_subpath(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("rootSubpath")
Client.execute(git_module_source.client, query_builder)
end
@doc "The specified version of the git repo this source points to."
@spec version(t()) :: {:ok, String.t()} | {:error, term()}
def version(%__MODULE__{} = git_module_source) do
query_builder =
git_module_source.query_builder |> QB.select("version")
Client.execute(git_module_source.client, query_builder)
end
end