github

package
v0.10.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 8 Imported by: 0 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient *httputil.HTTPClient
}

func NewGithubClient

func NewGithubClient() *Client

NewGithubClient returns a HTTP client for interfacing with github

func (*Client) GithubRequest

func (c *Client) GithubRequest(url string, method string) (*httputil.HTTPResponse, error)

GithubRequest Sends an http request to github and returns a basic response obj

func (*Client) RepoLatestRequest

func (c *Client) RepoLatestRequest(orgName string, repoName string) (*RepoLatestResponse, error)

RepoLatestRequest Makes a request to grab the latest release of a github repository

func (*Client) RepoTagRequest

func (c *Client) RepoTagRequest(orgName string, repoName string, tagName string) (*RepoLatestResponse, error)

RepoTagRequest makes a request to grab a specific tag of a github repository

type RepoLatestResponse

type RepoLatestResponse struct {
	Url         string    `json:"url"`
	TagName     string    `json:"tag_name"`
	Draft       bool      `json:"draft"`
	CreatedAt   time.Time `json:"created_at"`
	PublishedAt time.Time `json:"published_at"`
}

RepoLatestResponse represents a tag info response from Github API

Jump to

Keyboard shortcuts

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