Documentation ¶
Index ¶
- type Client
- func (c *Client) ClearStates(ctx context.Context, repoName, sha string) error
- func (c *Client) Close() error
- func (c *Client) CommentError(ctx context.Context, repoName string, prID int64, errstr string) error
- func (c *Client) ErrorStatus(ctx context.Context, repoName, sha, runName, url string, eErr error) error
- func (c *Client) FinishedStatus(ctx context.Context, repoName, sha, runName, url string, status bool, ...) error
- func (c *Client) GetDiffFiles(ctx context.Context, repoName, base, head string) ([]string, error)
- func (c *Client) GetFile(ctx context.Context, repoName, sha, filename string) ([]byte, error)
- func (c *Client) GetFileList(ctx context.Context, repoName, sha string) ([]string, error)
- func (c *Client) GetRefs(ctx context.Context, repoName, sha string) ([]string, error)
- func (c *Client) GetRepository(ctx context.Context, u *model.User, repoName string) (*repository.RepositoryData, error)
- func (c *Client) GetSHA(ctx context.Context, repoName, ref string) (string, error)
- func (c *Client) MyLogin(ctx context.Context, token string) (string, error)
- func (c *Client) MyRepositories(ctx context.Context, u *model.User) ([]*repository.RepositoryData, error)
- func (c *Client) PendingStatus(ctx context.Context, repoName, sha, runName, url string) error
- func (c *Client) SetupHook(ctx context.Context, repoName, url, secret string) error
- func (c *Client) StartedStatus(ctx context.Context, repoName, sha, runName, url string) error
- func (c *Client) TeardownHook(ctx context.Context, repoName, url string) error
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 is a repository client.
func (*Client) ClearStates ¶
ClearStates removes all status reports from a SHA in an attempt to restart the process.
func (*Client) CommentError ¶
func (c *Client) CommentError(ctx context.Context, repoName string, prID int64, errstr string) error
CommentError is for commenting on PRs when there is no better means of bubbling up an error.
func (*Client) ErrorStatus ¶
func (c *Client) ErrorStatus(ctx context.Context, repoName, sha, runName, url string, eErr error) error
ErrorStatus updates the status for the sha for the given repo.
func (*Client) FinishedStatus ¶
func (c *Client) FinishedStatus(ctx context.Context, repoName, sha, runName, url string, status bool, msg string) error
FinishedStatus updates the status for the sha for the given repo.
func (*Client) GetDiffFiles ¶
GetDiffFiles retrieves the files present in the diff between the base and the head.
func (*Client) GetFile ¶
GetFile retrieves an entire file by way of the repoName, sha, and filename.
func (*Client) GetFileList ¶
GetFileList finds all the files in the tree for the given repository
func (*Client) GetRepository ¶
func (c *Client) GetRepository(ctx context.Context, u *model.User, repoName string) (*repository.RepositoryData, error)
GetRepository retrieves the github response for a given repository.
func (*Client) MyLogin ¶
MyLogin returns the username calling out to the API with its key. Can either be seeded by OAuth or Personal Token.
func (*Client) MyRepositories ¶
func (c *Client) MyRepositories(ctx context.Context, u *model.User) ([]*repository.RepositoryData, error)
MyRepositories returns all the writable repositories accessible to user owning the access key
func (*Client) PendingStatus ¶
PendingStatus updates the status for the sha for the given repo.
func (*Client) StartedStatus ¶
StartedStatus updates the status for the sha for the given repo.