api

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIURL

func APIURL(host string) string

APIURL returns the API base URL for a given host.

func WebURL

func WebURL(host, path string) string

WebURL returns the web URL for a given host and path.

Types

type Client

type Client struct {
	*gitlab.Client
	// contains filtered or unexported fields
}

Client wraps the GitLab API client.

func NewClient

func NewClient(host string) (*Client, error)

NewClient creates a new authenticated GitLab API client. It automatically selects the correct client type based on the stored auth method.

func NewClientWithToken

func NewClientWithToken(host, token string) (*Client, error)

NewClientWithToken creates a new GitLab API client with the given token.

func NewOAuthClient added in v0.0.2

func NewOAuthClient(host, token string) (*Client, error)

NewOAuthClient creates a new GitLab API client using an OAuth token.

func (*Client) Host

func (c *Client) Host() string

Host returns the hostname of the GitLab instance.

Jump to

Keyboard shortcuts

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