// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package tangled

// schema: sh.tangled.sync.requestCrawl

import (
	"context"

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

const (
	SyncRequestCrawlNSID = "sh.tangled.sync.requestCrawl"
)

// SyncRequestCrawl_Input is the input argument to a sh.tangled.sync.requestCrawl call.
type SyncRequestCrawl_Input struct {
	// ensureRepo: specific repository to ensure crawling
	EnsureRepo *string `json:"ensureRepo,omitempty" cborgen:"ensureRepo,omitempty"`
	// hostname: Hostname of the current service (eg, Knot) that is requesting to be crawled.
	Hostname string `json:"hostname" cborgen:"hostname"`
}

// SyncRequestCrawl calls the XRPC method "sh.tangled.sync.requestCrawl".
func SyncRequestCrawl(ctx context.Context, c util.LexClient, input *SyncRequestCrawl_Input) error {
	if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.sync.requestCrawl", nil, input, nil); err != nil {
		return err
	}

	return nil
}
