~james/core

core/api/org_tangled/temprepogetSiteConfig.go -rw-r--r-- 1.6 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package org_tangled

// schema: org.tangled.temp.repo.getSiteConfig

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	TempRepoGetSiteConfigNSID = "org.tangled.temp.repo.getSiteConfig"
)

// TempRepoGetSiteConfig_Output is the output of a org.tangled.temp.repo.getSiteConfig call.
type TempRepoGetSiteConfig_Output struct {
	// config: Site config for the repository. Absent if no site is configured.
	Config *TempRepoGetSiteConfig_SiteConfig `json:"config,omitempty" cborgen:"config,omitempty"`
}

// TempRepoGetSiteConfig_SiteConfig is a "siteConfig" in the org.tangled.temp.repo.getSiteConfig schema.
type TempRepoGetSiteConfig_SiteConfig struct {
	// branch: Branch to deploy from.
	Branch string `json:"branch" cborgen:"branch"`
	// dir: Directory within the repository to deploy (e.g. '/' or '/docs').
	Dir string `json:"dir" cborgen:"dir"`
	// isIndex: Whether this repo serves as the index (root) for the domain.
	IsIndex bool `json:"isIndex" cborgen:"isIndex"`
}

// TempRepoGetSiteConfig calls the XRPC method "org.tangled.temp.repo.getSiteConfig".
//
// repoDid: DID of the repository as minted by the knot.
func TempRepoGetSiteConfig(ctx context.Context, c util.LexClient, repoDid string) (*TempRepoGetSiteConfig_Output, error) {
	var out TempRepoGetSiteConfig_Output

	params := map[string]interface{}{}
	params["repoDid"] = repoDid
	if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.repo.getSiteConfig", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}