gitlab

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr added in v0.8.0

func Ptr[T any](v T) *T

Types

type Client

type Client struct {
	URL string

	Rest    *rest.Client
	GraphQL *graphql.Client
	HTTP    *HTTPClient
	// contains filtered or unexported fields
}

func NewGitLabClient

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

func (*Client) Acquire added in v0.10.0

func (c *Client) Acquire(ctx context.Context, n int64) error

func (*Client) CheckReadiness

func (c *Client) CheckReadiness(ctx context.Context) error

func (*Client) Release added in v0.10.0

func (c *Client) Release(n int64)

type ClientConfig

type ClientConfig struct {
	URL   string
	Token string

	OAuth *OAuthConfig

	RateLimit float64

	MaxWorkers int
}

type HTTPClient added in v0.12.0

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

func NewHTTPClient added in v0.12.0

func NewHTTPClient(url string, config *OAuthConfig) (*HTTPClient, error)

func (*HTTPClient) ChechAuth added in v0.12.0

func (c *HTTPClient) ChechAuth() error

func (*HTTPClient) Do added in v0.12.0

func (c *HTTPClient) Do(req *http.Request) (*http.Response, error)

func (*HTTPClient) GetPath added in v0.12.0

func (c *HTTPClient) GetPath(path string) (*http.Response, error)

func (*HTTPClient) GetProjectJobArtifactsFile added in v0.12.0

func (c *HTTPClient) GetProjectJobArtifactsFile(ctx context.Context, projectPath string, jobId int64, fileType string) (*bytes.Reader, error)

type OAuthConfig added in v0.12.0

type OAuthConfig struct {
	config.GitLabOAuthSecrets

	FlowType string
	Scopes   []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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