gitlabrepo

package
v4.13.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 22 Imported by: 3

Documentation

Overview

Package gitlabrepo implements clients.RepoClient for GitLab.

NOTE: In Gitlab repositories are called projects, however to ensure compatibility, this package will regard to Gitlab projects as repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGitlabClient added in v4.11.0

func CreateGitlabClient(ctx context.Context, host string) (clients.RepoClient, error)

func CreateGitlabClientWithToken

func CreateGitlabClientWithToken(ctx context.Context, token, host string) (clients.RepoClient, error)

func CreateOssFuzzRepoClient

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

TODO(#2266): implement CreateOssFuzzRepoClient.

func MakeGitlabRepo

func MakeGitlabRepo(input string) (clients.Repo, error)

MakeGitlabRepo takes input of forms in parse and returns and implementation of clients.Repo interface.

Types

type Client

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

func (*Client) Close

func (client *Client) Close() error

func (*Client) GetBranch

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

func (*Client) GetCreatedAt

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

func (*Client) GetDefaultBranch

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

func (*Client) GetDefaultBranchName

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

func (*Client) GetFileContent

func (client *Client) GetFileContent(filename string) ([]byte, error)

func (*Client) GetOrgRepoClient added in v4.10.5

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

func (*Client) InitRepo

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

InitRepo sets up the GitLab project in local storage for improving performance and GitLab token usage efficiency.

func (*Client) IsArchived

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

func (*Client) ListCheckRunsForRef

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

func (*Client) ListCommits

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

func (*Client) ListContributors

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

func (*Client) ListFiles

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

func (*Client) ListIssues

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

func (*Client) ListLicenses added in v4.9.0

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

ListLicenses implements RepoClient.ListLicenses.

func (*Client) ListProgrammingLanguages

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

func (*Client) ListReleases

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

func (*Client) ListStatuses

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

func (*Client) ListSuccessfulWorkflowRuns

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

func (*Client) ListWebhooks

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

func (*Client) LocalPath added in v4.9.0

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

func (*Client) Search

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

func (*Client) SearchCommits

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

func (*Client) URI

func (client *Client) URI() string

type GitlabGID added in v4.11.0

type GitlabGID struct {
	Type string
	ID   int
}

func (*GitlabGID) UnmarshalJSON added in v4.11.0

func (g *GitlabGID) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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