Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapClientAuth ¶
WrapClientAuth returns a new *http.Client whose transport injects auth headers. If auth.TokenEnv, auth.UsernameEnv, and auth.PasswordEnv are all empty, the original client is returned unchanged.
Types ¶
type AzureDevOpsProvider ¶
type AzureDevOpsProvider struct {
// contains filtered or unexported fields
}
AzureDevOpsProvider fetches documentation from an Azure DevOps Git repository.
func NewAzureDevOpsProvider ¶
func NewAzureDevOpsProvider(cfg config.ResolvedSource, client *http.Client) *AzureDevOpsProvider
NewAzureDevOpsProvider constructs an AzureDevOpsProvider with authentication applied.
func (*AzureDevOpsProvider) Fetch ¶
func (p *AzureDevOpsProvider) Fetch(ctx context.Context, sha string, paths []string, destDir string) error
Fetch downloads the zip archive for sha and extracts only files whose paths match one of the given path prefixes into destDir.
API: GET /{org}/{project}/_apis/git/repositories/{repo}/items
?path=/&$format=zip&versionDescriptor.version={sha}&versionDescriptor.versionType=commit&api-version=7.0
type ConfluenceProvider ¶
type ConfluenceProvider struct {
// contains filtered or unexported fields
}
ConfluenceProvider fetches documentation from a Confluence instance.
func NewConfluenceProvider ¶
func NewConfluenceProvider(cfg config.ResolvedSource, page config.PageConfig, client *http.Client) *ConfluenceProvider
NewConfluenceProvider constructs a ConfluenceProvider with authentication applied.
type FetchResult ¶
FetchResult summarises the outcome of a FetchSource call.
type Fetcher ¶
type Fetcher struct {
Force bool
// contains filtered or unexported fields
}
Fetcher orchestrates the pipeline: resolve → cache-check → download → index.
func NewFetcher ¶
NewFetcher creates a Fetcher that uses store for persistence and dataDir for the raw file cache.
func (*Fetcher) FetchSource ¶
func (f *Fetcher) FetchSource(ctx context.Context, cfg config.ResolvedSource, ref config.RefConfig, page config.PageConfig, libName string, prov Provider) (*FetchResult, error)
FetchSource executes the full fetch pipeline for a single source+ref (or source+page for confluence).
type GitHubProvider ¶
type GitHubProvider struct {
// contains filtered or unexported fields
}
GitHubProvider fetches documentation from a GitHub repository.
func NewGitHubProvider ¶
func NewGitHubProvider(cfg config.ResolvedSource, client *http.Client) *GitHubProvider
NewGitHubProvider constructs a GitHubProvider with authentication applied.
type Provider ¶
type Provider interface {
Resolve(ctx context.Context, ref string) (string, error)
Fetch(ctx context.Context, sha string, paths []string, destDir string) error
}
Provider is the interface that all source providers must implement.
func NewProvider ¶
func NewProvider(src config.ResolvedSource, ref config.RefConfig, page config.PageConfig, client *http.Client) (Provider, error)
NewProvider constructs the appropriate Provider for cfg.