gerrit

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultNamespace   = "default"
	CodehostTypeGerrit = "gerrit"
	RemoteName         = "koderover"
	TimeFormat         = "2006-01-02 15:04:05.999999999"
)

Variables

This section is empty.

Functions

func Escape

func Escape(name string) string

func Unescape

func Unescape(id string) string

Types

type BasicAuthTransporter

type BasicAuthTransporter struct {
	EncodedUserPass string
	ProxyAddr       string
	EnableProxy     bool
}

func (*BasicAuthTransporter) RoundTrip

func (bt *BasicAuthTransporter) RoundTrip(req *http.Request) (*http.Response, error)

type Client

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

func NewClient

func NewClient(address, accessToken, proxyAddr string, enableProxy bool) *Client

func (*Client) CompareTwoPatchset

func (c *Client) CompareTwoPatchset(changeID, newPatchSetID, oldPatchSetID string) (bool, error)

CompareTwoPatchset 如果两个Patchset更新的内容相同,返回true,不相同则返回false

func (*Client) GetChangeDetail added in v1.9.9

func (c *Client) GetChangeDetail(changeID string) (*gerrit.ChangeInfo, error)

func (*Client) GetCommit

func (c *Client) GetCommit(project string, branch string) (*gerrit.CommitInfo, error)

func (*Client) GetCommitByBranch

func (c *Client) GetCommitByBranch(project string, branch string) (*gerrit.CommitInfo, error)

func (*Client) GetCommitByTag

func (c *Client) GetCommitByTag(project string, tag string) (*gerrit.CommitInfo, error)

func (*Client) GetCurrentVersionByChangeID

func (c *Client) GetCurrentVersionByChangeID(name string, pr int) (*gerrit.ChangeInfo, error)

func (*Client) ListBranches

func (c *Client) ListBranches(project string) ([]string, error)

func (*Client) ListProjects

func (c *Client) ListProjects() ([]*gerrit.ProjectInfo, error)

func (*Client) ListProjectsByKey

func (c *Client) ListProjectsByKey(keyword string) ([]*gerrit.ProjectInfo, error)

func (*Client) ListTags

func (c *Client) ListTags(project string) (result []*gerrit.TagInfo, err error)

func (*Client) SetReview

func (c *Client) SetReview(projectName string, changeID int, m, label, score, revision string) error

type HTTPClient

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

func NewHTTPClient

func NewHTTPClient(host, token string) *HTTPClient

func (*HTTPClient) DeleteWebhook added in v1.9.9

func (c *HTTPClient) DeleteWebhook(repoName, webhookName string) error

func (*HTTPClient) UpsertWebhook added in v1.9.9

func (c *HTTPClient) UpsertWebhook(repoName, webhookName string, events []string) error

type Webhook

type Webhook struct {
	URL       string `json:"url"`
	MaxTries  int    `json:"max_tries"`
	SslVerify bool   `json:"ssl_verify"`
	//Events    []pipeline.HookEventType `json:"events"`
	Events []string `json:"events"`
}

Jump to

Keyboard shortcuts

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