github

package
v0.0.0-...-2af298d Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildCallback

type BuildCallback struct {
	Username    string  `json:"username"`
	Repository  string  `json:"repository"`
	CommitHash  string  `json:"commitHash"`
	State       string  `json:"state"`
	BuildURL    *string `json:"buildURL,omitempty"`
	Description *string `json:"description,omitempty"`
	Context     *string `json:"context,omitempty"`
}

BuildCallback todo: add description

type Client

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

Client definess

func NewClient

func NewClient(httpClient *http.Client, integrationID int, installationID int, privKey []byte) (*Client, error)

NewClient initializes a Client instance

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.

func (*Client) NewRequest

func (c *Client) NewRequest(method string, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates new http.Request instance

func (*Client) UpdateCommitStatus

func (c *Client) UpdateCommitStatus(build *BuildCallback) error

UpdateCommitStatus todo: add description

type CommitStatus

type CommitStatus struct {
	State       string  `json:"state"`
	BuildURL    *string `json:"target_url,omitempty"`
	Description *string `json:"description,omitempty"`
	Context     *string `json:"context,omitempty"`
}

CommitStatus todo: add description

type Response

type Response struct {
	*http.Response
}

Response is an API response. This wraps the standard http.Response.

Jump to

Keyboard shortcuts

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