localdir

package
v5.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package localdir implements RepoClient on local source code.

Package localdir is local repo containing source code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLocalDirClient

func CreateLocalDirClient(ctx context.Context, logger *log.Logger) clients.RepoClient

CreateLocalDirClient returns a client which implements RepoClient interface.

func MakeLocalDirRepo

func MakeLocalDirRepo(pathfn string) (clients.Repo, error)

MakeLocalDirRepo returns an implementation of clients.Repo interface.

Types

type Client added in v5.1.0

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Close added in v5.1.0

func (client *Client) Close() error

func (*Client) GetBranch added in v5.1.0

func (client *Client) GetBranch(branch string) (*clients.BranchRef, error)

GetBranch implements RepoClient.GetBranch.

func (*Client) GetCreatedAt added in v5.1.0

func (client *Client) GetCreatedAt() (time.Time, error)

func (*Client) GetDefaultBranch added in v5.1.0

func (client *Client) GetDefaultBranch() (*clients.BranchRef, error)

GetDefaultBranch implements RepoClient.GetDefaultBranch.

func (*Client) GetDefaultBranchName added in v5.1.0

func (client *Client) GetDefaultBranchName() (string, error)

GetDefaultBranchName implements RepoClient.GetDefaultBranchName.

func (*Client) GetFileReader added in v5.1.0

func (client *Client) GetFileReader(filename string) (io.ReadCloser, error)

GetFileReader implements RepoClient.GetFileReader.

func (*Client) GetOrgRepoClient added in v5.1.0

func (client *Client) GetOrgRepoClient(ctx context.Context) (clients.RepoClient, error)

func (*Client) InitRepo added in v5.1.0

func (client *Client) InitRepo(inputRepo clients.Repo, commitSHA string, commitDepth int) error

InitRepo sets up the local repo.

func (*Client) IsArchived added in v5.1.0

func (client *Client) IsArchived() (bool, error)

IsArchived implements RepoClient.IsArchived.

func (*Client) ListCheckRunsForRef added in v5.1.0

func (client *Client) ListCheckRunsForRef(ref string) ([]clients.CheckRun, error)

ListCheckRunsForRef implements RepoClient.ListCheckRunsForRef.

func (*Client) ListCommits added in v5.1.0

func (client *Client) ListCommits() ([]clients.Commit, error)

ListCommits implements RepoClient.ListCommits.

func (*Client) ListContributors added in v5.1.0

func (client *Client) ListContributors() ([]clients.User, error)

ListContributors implements RepoClient.ListContributors.

func (*Client) ListFiles added in v5.1.0

func (client *Client) ListFiles(predicate func(string) (bool, error)) ([]string, error)

ListFiles implements RepoClient.ListFiles.

func (*Client) ListIssues added in v5.1.0

func (client *Client) ListIssues() ([]clients.Issue, error)

ListIssues implements RepoClient.ListIssues.

func (*Client) ListLicenses added in v5.1.0

func (client *Client) ListLicenses() ([]clients.License, error)

ListLicenses implements RepoClient.ListLicenses. TODO: add ListLicenses support for local directories.

func (*Client) ListProgrammingLanguages added in v5.1.0

func (client *Client) ListProgrammingLanguages() ([]clients.Language, error)

ListProgrammingLanguages implements RepoClient.ListProgrammingLanguages. TODO: add ListProgrammingLanguages support for local directories.

func (*Client) ListReleases added in v5.1.0

func (client *Client) ListReleases() ([]clients.Release, error)

ListReleases implements RepoClient.ListReleases.

func (*Client) ListStatuses added in v5.1.0

func (client *Client) ListStatuses(ref string) ([]clients.Status, error)

ListStatuses implements RepoClient.ListStatuses.

func (*Client) ListSuccessfulWorkflowRuns added in v5.1.0

func (client *Client) ListSuccessfulWorkflowRuns(filename string) ([]clients.WorkflowRun, error)

ListSuccessfulWorkflowRuns implements RepoClient.WorkflowRunsByFilename.

func (*Client) ListWebhooks added in v5.1.0

func (client *Client) ListWebhooks() ([]clients.Webhook, error)

ListWebhooks implements RepoClient.ListWebhooks.

func (*Client) LocalPath added in v5.1.0

func (client *Client) LocalPath() (string, error)

LocalPath implements RepoClient.LocalPath.

func (*Client) Search added in v5.1.0

func (client *Client) Search(request clients.SearchRequest) (clients.SearchResponse, error)

Search implements RepoClient.Search.

func (*Client) SearchCommits added in v5.1.0

func (client *Client) SearchCommits(request clients.SearchCommitsOptions) ([]clients.Commit, error)

SearchCommits implements RepoClient.SearchCommits.

func (*Client) URI added in v5.1.0

func (client *Client) URI() string

URI implements RepoClient.URI.

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func (*Repo) AppendMetadata

func (r *Repo) AppendMetadata(m ...string)

AppendMetadata implements Repo.AppendMetadata.

func (*Repo) Host

func (r *Repo) Host() string

func (*Repo) IsValid

func (r *Repo) IsValid() error

IsValid implements Repo.IsValid.

func (*Repo) Metadata

func (r *Repo) Metadata() []string

Metadata implements Repo.Metadata.

func (*Repo) Path

func (r *Repo) Path() string

Path() implements RepoClient.Path.

func (*Repo) String

func (r *Repo) String() string

String implements Repo.String.

func (*Repo) URI

func (r *Repo) URI() string

URI implements Repo.URI().

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL