ghapi

package
v0.0.0-...-087451f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name  string    `json:"name"`
	Email string    `json:"email"`
	Date  time.Time `json:"date"`
}

Author ...

type Client

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

Client ...

func NewClient

func NewClient(clientID, clientSecret string) *Client

NewClient ...

func (*Client) GetGithubRepo

func (c *Client) GetGithubRepo(code, reponame string) (*Repo, error)

GetGithubRepo ...

func (*Client) GetGithubUser

func (c *Client) GetGithubUser(code string) (*UserResponse, error)

GetGithubUser ...

func (*Client) GetGithubUserAccessToken

func (c *Client) GetGithubUserAccessToken(code string) (token string, err error)

GetGithubUserAccessToken ...

func (*Client) GetGithubUserRepoCommits

func (c *Client) GetGithubUserRepoCommits(item *database.UsersReposResult) ([]*CommitItem, error)

GetGithubUserRepoCommits ...

func (*Client) GetGithubUserRepos

func (c *Client) GetGithubUserRepos(code, username string) ([]*Repo, error)

GetGithubUserRepos ...

func (*Client) MakeRequest

func (c *Client) MakeRequest(url, token string) ([]byte, error)

MakeRequest ...

type Commit

type Commit struct {
	Author    Author    `json:"author"`
	Message   string    `json:"message"`
	Committer Committer `json:"committer"`
}

Commit ...

type CommitItem

type CommitItem struct {
	SHA     string `json:"sha"`
	Commit  Commit `json:"commit"`
	URL     string `json:"url"`
	HTMLUrl string `json:"html_url"`
}

CommitItem ...

type Committer

type Committer struct {
	Name  string    `json:"name"`
	Email string    `json:"email"`
	Date  time.Time `json:"date"`
}

Committer ...

type OAuthAccessResponse

type OAuthAccessResponse struct {
	AccessToken string `json:"access_token"`
}

OAuthAccessResponse ...

type Repo

type Repo struct {
	Name      string    `json:"name"`
	FullName  string    `json:"full_name"`
	UpdatedAt time.Time `json:"updated_at"`
}

Repo ...

type RepoErrorAnswer

type RepoErrorAnswer struct {
	Message          string `json:"message"`
	DocumentationURL string `json:"documentation_url"`
}

RepoErrorAnswer ...

type UserResponse

type UserResponse struct {
	Name     string `json:"name"`
	UserName string `json:"login"`
}

UserResponse ...

Jump to

Keyboard shortcuts

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