clients

package
v0.0.0-...-678b47c Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package clients implements Git Clients used for API interactions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

type GitHub struct {

	// URLLookup is a map of Github User/Org names and their respective URLs
	URLLookup KeyPair
	// contains filtered or unexported fields
}

func NewGitHub

func NewGitHub() *GitHub

func (*GitHub) AllPullRequestsFor

func (gh *GitHub) AllPullRequestsFor(baseURL, user string, token string) ([]PullRequest, error)

AllPullRequestsFor all repositories for a given user Orgs are not supported for this method

func (*GitHub) AllRepositoriesFor

func (gh *GitHub) AllRepositoriesFor(baseURL, namespace string, user bool, token string) ([]Repository, error)

type KeyPair

type KeyPair = map[string]string

type Owner

type Owner struct {
	Login string `json:"login"`
}

type PullRequest

type PullRequest struct {
	Number        int    `json:"number"`
	Title         string `json:"title"`
	User          Owner  `json:"user"`
	URL           string `json:"html_url"`
	Draft         bool   `json:"draft"`
	RepositoryURL string `json:"repository_url"`
}

func (PullRequest) RepositoryName

func (pr PullRequest) RepositoryName() string

type Repository

type Repository struct {
	Name        string `json:"name"`
	FullName    string `json:"full_name"`
	Owner       Owner  `json:"owner"`
	CloneURL    string `json:"clone_url"`
	WebURL      string `json:"html_url"`
	Description string `json:"description"`
}

Directories

Path Synopsis
Package httpclient provides a client for working with HTTP requests, using a method based API.
Package httpclient provides a client for working with HTTP requests, using a method based API.

Jump to

Keyboard shortcuts

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