gitlab

package
v1.4.10 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseURL = "https://gitlab.com/api/v4"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(project string, opts ...ClientOption) (*Client, error)

func (*Client) CreateNote

func (c *Client) CreateNote(ctx context.Context, prID int, comment string) error

func (*Client) PullRequestNotes

func (c *Client) PullRequestNotes(ctx context.Context, prID int) ([]Note, error)

func (*Client) UpdateNote

func (c *Client) UpdateNote(ctx context.Context, prID int, noteID int, comment string) error

type ClientOption

type ClientOption func(*Client) error

func WithBaseURL

func WithBaseURL(url string) ClientOption

WithBaseURL sets the base URL for the Gitlab client.

func WithToken

func WithToken(token string) ClientOption

WithToken sets the private token for the Gitlab client.

type Note

type Note struct {
	ID     int    `json:"id"`
	Body   string `json:"body"`
	System bool   `json:"system"`
}

type PrivateToken

type PrivateToken struct {
	Token string
	Base  http.RoundTripper
}

func (*PrivateToken) CancelRequest

func (t *PrivateToken) CancelRequest(req *http.Request)

func (*PrivateToken) RoundTrip

func (t *PrivateToken) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳