gitlab

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client manages client side of Gitlab REST API

func NewClient

func NewClient(baseURL, token string) *Client

NewClient creates a new client of Gitlab

func (*Client) PublishCommitStatus

func (c *Client) PublishCommitStatus(repository, commitSHA, labelName, targetURL, description string,
	status CommitStatus) error

PublishCommitStatus publishes a commit status for a given SHA

type CommitStatus

type CommitStatus string

CommitStatus represents a commit status

const (
	// CommitStatusSuccess represents a success of commit status
	CommitStatusSuccess CommitStatus = "success"
	// CommitStatusFailure represents a failure of commit status
	CommitStatusFailure CommitStatus = "failed"
)

type Gitlab

type Gitlab interface {
	// PublishCommitStatus publishes a commit status for a given SHA
	PublishCommitStatus(repository, commitSHA, labelName, targetURL, description string, status CommitStatus) error
}

Gitlab is the interface of Gitlab using Gitlab REST API

Jump to

Keyboard shortcuts

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