MCPcopy Create free account
hub / github.com/dagger/dagger / Install

Method Install

core/schema/git.go:51–172  ·  view source on GitHub ↗
(srv *dagql.Server)

Source from the content-addressed store, hash-verified

49type gitSchema struct{}
50
51func (s *gitSchema) Install(srv *dagql.Server) {
52 dagql.Fields[*core.Query]{
53 dagql.NodeFunc("git", s.git).
54 WithInput(dagql.PerClientInput).
55 View(AllVersion).
56 Doc(`Queries a Git repository.`).
57 Args(
58 dagql.Arg("url").Doc(
59 `URL of the git repository.`,
60 "Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.",
61 `Suffix ".git" is optional.`),
62 dagql.Arg("keepGitDir").
63 View(AllVersion).
64 Default(dagql.Opt(dagql.Boolean(true))).
65 Doc(`Set to true to keep .git directory.`).Deprecated(),
66 dagql.Arg("keepGitDir").
67 View(BeforeVersion("v0.13.4")).
68 Doc(`Set to true to keep .git directory.`).Deprecated(),
69 dagql.Arg("sshKnownHosts").Doc(`Set SSH known hosts`),
70 dagql.Arg("sshAuthSocket").Doc(`Set SSH auth socket`),
71 dagql.Arg("httpAuthUsername").Doc(`Username used to populate the password during basic HTTP Authorization`),
72 dagql.Arg("httpAuthToken").Doc(`Secret used to populate the password during basic HTTP Authorization`),
73 dagql.Arg("httpAuthHeader").Doc(`Secret used to populate the Authorization HTTP header`),
74 dagql.Arg("experimentalServiceHost").Doc(`A service which must be started before the repo is fetched.`),
75 ),
76 }.Install(srv)
77
78 dagql.Fields[*core.GitRepository]{
79 dagql.NodeFunc("head", s.head).
80 Doc(`Returns details for HEAD.`),
81 dagql.NodeFunc("ref", s.ref).
82 Doc(`Returns details of a ref.`).
83 Args(
84 dagql.Arg("name").Doc(`Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).`),
85 ),
86 dagql.NodeFunc("branch", s.branch).
87 View(AllVersion).
88 Doc(`Returns details of a branch.`).
89 Args(
90 dagql.Arg("name").Doc(`Branch's name (e.g., "main").`),
91 ),
92 dagql.NodeFunc("tag", s.tag).
93 View(AllVersion).
94 Doc(`Returns details of a tag.`).
95 Args(
96 dagql.Arg("name").Doc(`Tag's name (e.g., "v0.3.9").`),
97 ),
98 dagql.NodeFunc("commit", s.commit).
99 View(AllVersion).
100 Doc(`Returns details of a commit.`).
101 Args(
102 // TODO: id is normally a reserved word; we should probably rename this
103 dagql.Arg("id").Doc(`Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").`),
104 ),
105 dagql.NodeFunc("latestVersion", s.latestVersion).
106 Doc(`Returns details for the latest semver tag.`),
107
108 dagql.Func("tags", s.tags).

Callers

nothing calls this directly

Calls 14

NodeFuncFunction · 0.92
ArgFunction · 0.92
OptFunction · 0.92
BooleanTypeAlias · 0.92
FuncFunction · 0.92
BeforeVersionTypeAlias · 0.85
DefaultMethod · 0.80
IsPersistableMethod · 0.80
InstallMethod · 0.65
ViewMethod · 0.65
ArgsMethod · 0.45
DocMethod · 0.45

Tested by

no test coverage detected