gitlab

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(disableTLSVerify bool) *http.Client

NewHTTPClient ..

Types

type Client

type Client struct {
	*goGitlab.Client

	Readiness struct {
		URL        string
		HTTPClient *http.Client
	}

	RateLimiter       ratelimit.Limiter
	RateCounter       *ratecounter.RateCounter
	RequestsCounter   atomic.Uint64
	RequestsLimit     int
	RequestsRemaining int
}

Client ..

func NewClient

func NewClient(cfg ClientConfig) (*Client, error)

NewClient ..

func (*Client) GetBranchLatestCommit

func (c *Client) GetBranchLatestCommit(ctx context.Context, project, branch string) (string, float64, error)

GetBranchLatestCommit ..

func (*Client) GetCommitCountBetweenRefs

func (c *Client) GetCommitCountBetweenRefs(ctx context.Context, project, from, to string) (int, error)

GetCommitCountBetweenRefs ..

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(
	ctx context.Context,
	project string,
	environmentID int,
) (
	environment schemas.Environment,
	err error,
)

GetEnvironment ..

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, name string) (*goGitlab.Project, error)

GetProject ..

func (*Client) GetProjectBranches

func (c *Client) GetProjectBranches(ctx context.Context, p schemas.Project) (
	refs schemas.Refs,
	err error,
)

GetProjectBranches ..

func (*Client) GetProjectEnvironments

func (c *Client) GetProjectEnvironments(ctx context.Context, p schemas.Project) (
	envs schemas.Environments,
	err error,
)

GetProjectEnvironments ..

func (*Client) GetProjectMostRecentTagCommit

func (c *Client) GetProjectMostRecentTagCommit(ctx context.Context, projectName, filterRegexp string) (string, float64, error)

GetProjectMostRecentTagCommit ..

func (*Client) GetProjectPipelines

func (c *Client) GetProjectPipelines(
	ctx context.Context,
	projectName string,
	options *goGitlab.ListProjectPipelinesOptions,
) (
	[]*goGitlab.PipelineInfo,
	*goGitlab.Response,
	error,
)

GetProjectPipelines ..

func (*Client) GetProjectTags

func (c *Client) GetProjectTags(ctx context.Context, p schemas.Project) (
	refs schemas.Refs,
	err error,
)

GetProjectTags ..

func (*Client) GetRefPipeline

func (c *Client) GetRefPipeline(ctx context.Context, ref schemas.Ref, pipelineID int) (p schemas.Pipeline, err error)

GetRefPipeline ..

func (*Client) GetRefPipelineTestReport

func (c *Client) GetRefPipelineTestReport(ctx context.Context, ref schemas.Ref) (schemas.TestReport, error)

GetRefPipelineTestReport ..

func (*Client) GetRefPipelineVariablesAsConcatenatedString

func (c *Client) GetRefPipelineVariablesAsConcatenatedString(ctx context.Context, ref schemas.Ref) (string, error)

GetRefPipelineVariablesAsConcatenatedString ..

func (*Client) GetRefsFromPipelines

func (c *Client) GetRefsFromPipelines(ctx context.Context, p schemas.Project, refKind schemas.RefKind) (refs schemas.Refs, err error)

GetRefsFromPipelines ..

func (*Client) ListPipelineBridges

func (c *Client) ListPipelineBridges(ctx context.Context, projectNameOrID string, pipelineID int) (bridges []*goGitlab.Bridge, err error)

ListPipelineBridges ..

func (*Client) ListPipelineChildJobs

func (c *Client) ListPipelineChildJobs(ctx context.Context, projectNameOrID string, parentPipelineID int) (jobs []schemas.Job, err error)

ListPipelineChildJobs ..

func (*Client) ListPipelineJobs

func (c *Client) ListPipelineJobs(ctx context.Context, projectNameOrID string, pipelineID int) (jobs []schemas.Job, err error)

ListPipelineJobs ..

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context, w config.Wildcard) ([]schemas.Project, error)

ListProjects ..

func (*Client) ListRefMostRecentJobs

func (c *Client) ListRefMostRecentJobs(ctx context.Context, ref schemas.Ref) (jobs []schemas.Job, err error)

ListRefMostRecentJobs ..

func (*Client) ListRefPipelineJobs

func (c *Client) ListRefPipelineJobs(ctx context.Context, ref schemas.Ref) (jobs []schemas.Job, err error)

ListRefPipelineJobs ..

func (*Client) ReadinessCheck

func (c *Client) ReadinessCheck(ctx context.Context) healthcheck.Check

ReadinessCheck ..

type ClientConfig

type ClientConfig struct {
	URL              string
	Token            string
	UserAgentVersion string
	DisableTLSVerify bool
	ReadinessURL     string

	RateLimiter ratelimit.Limiter
}

ClientConfig ..

Jump to

Keyboard shortcuts

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