gitlab

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GitLab string = "gitlab"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, baseUrl string, token string) (*Client, error)

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, projectID string) (analyze.Repository, error)

func (*Client) ListGroupProjects

func (c *Client) ListGroupProjects(ctx context.Context, groupID string) <-chan analyze.RepoBatch

type GitLabRepo

type GitLabRepo struct {
	analyze.Repository
	NameWithNamespace string
	IsFork            bool
	IsPrivate         bool
	IsMirror          bool
	IsArchived        bool
	StarCount         int
	ForksCount        int
}

func (GitLabRepo) BuildGitURL

func (gl GitLabRepo) BuildGitURL(baseURL string) string

func (GitLabRepo) GetIsFork added in v0.10.0

func (gl GitLabRepo) GetIsFork() bool

func (GitLabRepo) GetProviderName

func (gl GitLabRepo) GetProviderName() string

func (GitLabRepo) GetRepoIdentifier

func (gl GitLabRepo) GetRepoIdentifier() string

type ScmClient

type ScmClient struct {
	analyze.ScmClient
	// contains filtered or unexported fields
}

func NewGitlabSCMClient

func NewGitlabSCMClient(ctx context.Context, baseURL string, token string) (*ScmClient, error)

func (*ScmClient) GetOrgRepos

func (s *ScmClient) GetOrgRepos(ctx context.Context, org string) <-chan analyze.RepoBatch

func (*ScmClient) GetProviderBaseURL

func (s *ScmClient) GetProviderBaseURL() string

func (*ScmClient) GetProviderName

func (s *ScmClient) GetProviderName() string

func (*ScmClient) GetProviderVersion

func (s *ScmClient) GetProviderVersion(ctx context.Context) (string, error)

func (*ScmClient) GetRepo

func (s *ScmClient) GetRepo(ctx context.Context, org string, name string) (analyze.Repository, error)

func (*ScmClient) GetToken

func (s *ScmClient) GetToken() string

func (*ScmClient) ParseRepoAndOrg

func (s *ScmClient) ParseRepoAndOrg(repoString string) (string, string, error)

Jump to

Keyboard shortcuts

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