// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. package org_tangled // schema: org.tangled.git.getBlame import ( "context" "github.com/bluesky-social/indigo/lex/util" ) const ( GitGetBlameNSID = "org.tangled.git.getBlame" ) // GitGetBlame_Author is a "author" in the org.tangled.git.getBlame schema. type GitGetBlame_Author struct { Email string `json:"email" cborgen:"email"` Name string `json:"name" cborgen:"name"` } // GitGetBlame_Commit is a "commit" in the org.tangled.git.getBlame schema. type GitGetBlame_Commit struct { Author *GitGetBlame_Author `json:"author" cborgen:"author"` // authoredAt: When the change was authored AuthoredAt string `json:"authoredAt" cborgen:"authoredAt"` // sha: Commit Object ID Sha string `json:"sha" cborgen:"sha"` // subject: First line of the commit message Subject string `json:"subject" cborgen:"subject"` } // GitGetBlame_Output is the output of a org.tangled.git.getBlame call. type GitGetBlame_Output struct { // commit: The resolved commit Object ID Commit string `json:"commit" cborgen:"commit"` // commits: Unique commits referenced by blame runs Commits []*GitGetBlame_Commit `json:"commits" cborgen:"commits"` // runs: Complete, gap-free one-based line ranges sorted by start Runs []*GitGetBlame_Run `json:"runs" cborgen:"runs"` } // GitGetBlame_Run is a "run" in the org.tangled.git.getBlame schema. type GitGetBlame_Run struct { // commit: The commit Object ID of the entry in commits this run is attributed to Commit string `json:"commit" cborgen:"commit"` // count: Number of lines in the run Count int64 `json:"count" cborgen:"count"` // start: First line of the run, one-based Start int64 `json:"start" cborgen:"start"` } // GitGetBlame calls the XRPC method "org.tangled.git.getBlame". // // path: Path of the file to blame // ref: Git revision (branch, tag, or commit Object ID) // repo: DID of the repository func GitGetBlame(ctx context.Context, c util.LexClient, path string, ref string, repo string) (*GitGetBlame_Output, error) { var out GitGetBlame_Output params := map[string]interface{}{} params["path"] = path params["ref"] = ref params["repo"] = repo if err := c.LexDo(ctx, util.Query, "", "org.tangled.git.getBlame", params, nil, &out); err != nil { return nil, err } return &out, nil }