gitlab

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound error = gitlab.ErrNotFound

Functions

func Ptr added in v0.8.0

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

Types

type AuthConfig added in v0.13.0

type AuthConfig struct {
	AuthType AuthType
	Basic    BasicAuthConfig
}

type AuthType added in v0.13.0

type AuthType int
const (
	SessionAuth AuthType
)

type BasicAuthConfig added in v0.13.0

type BasicAuthConfig struct {
	Username string
	Password string
}

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

	Auth AuthConfig

	RateLimit float64

	MaxWorkers int
}

type Doer added in v0.13.0

type Doer interface {
	Do(req *http.Request) (*http.Response, error)
}

type HTTPClient added in v0.12.0

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

func NewHTTPClient added in v0.12.0

func NewHTTPClient(baseUrl string, cfg AuthConfig) (*HTTPClient, error)

func (*HTTPClient) CheckAuthed added in v0.13.0

func (c *HTTPClient) CheckAuthed() error

func (*HTTPClient) Do added in v0.12.0

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

func (*HTTPClient) Get added in v0.13.0

func (c *HTTPClient) Get(url string) (*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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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