Documentation ¶
Overview ¶
Package gitlab provides gitlab related code
Index ¶
- func Defaults() cloud.Config
- func HandleEvent(w http.ResponseWriter, r *http.Request, opts cloud.HandleEventOptions) cloud.VCSEvent
- func NewTestServer(t *testing.T, opts ...TestGitlabServerOption) *httptest.Server
- func OAuthDefaults() *oauth2.Config
- type Client
- func (g *Client) CreateWebhook(ctx context.Context, opts cloud.CreateWebhookOptions) (string, error)
- func (g *Client) DeleteWebhook(ctx context.Context, opts cloud.DeleteWebhookOptions) error
- func (g *Client) GetRepoTarball(ctx context.Context, opts cloud.GetRepoTarballOptions) ([]byte, error)
- func (g *Client) GetRepository(ctx context.Context, identifier string) (string, error)
- func (g *Client) GetUser(ctx context.Context) (*cloud.User, error)
- func (g *Client) GetWebhook(ctx context.Context, opts cloud.GetWebhookOptions) (cloud.Webhook, error)
- func (g *Client) ListRepositories(ctx context.Context, lopts cloud.ListRepositoriesOptions) ([]string, error)
- func (g *Client) ListTags(ctx context.Context, opts cloud.ListTagsOptions) ([]string, error)
- func (g *Client) SetStatus(ctx context.Context, opts cloud.SetStatusOptions) error
- func (g *Client) UpdateWebhook(ctx context.Context, id string, opts cloud.UpdateWebhookOptions) error
- type Cloud
- type TestGitlabServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleEvent ¶
func HandleEvent(w http.ResponseWriter, r *http.Request, opts cloud.HandleEventOptions) cloud.VCSEvent
func NewTestServer ¶
func NewTestServer(t *testing.T, opts ...TestGitlabServerOption) *httptest.Server
func OAuthDefaults ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateWebhook ¶
func (*Client) DeleteWebhook ¶
func (*Client) GetRepoTarball ¶
func (*Client) GetRepository ¶
func (*Client) GetUser ¶
GetUser retrieves a user. Their team memberships are determined based on their access level in their gitlab groups, e.g. a user with owners access level on group acme maps to a user in the owners team in the acme organization.
func (*Client) GetWebhook ¶
func (*Client) ListRepositories ¶
func (*Client) UpdateWebhook ¶
type Cloud ¶
type Cloud struct{}
func (Cloud) HandleEvent ¶
func (Cloud) HandleEvent(w http.ResponseWriter, r *http.Request, opts cloud.HandleEventOptions) cloud.VCSEvent
type TestGitlabServerOption ¶
type TestGitlabServerOption func(*testServerDB)
func WithGitlabRepo ¶
func WithGitlabRepo(repo string) TestGitlabServerOption
func WithGitlabTarball ¶
func WithGitlabTarball(tarball []byte) TestGitlabServerOption
func WithGitlabUser ¶
func WithGitlabUser(user *cloud.User) TestGitlabServerOption
Click to show internal directories.
Click to hide internal directories.