client

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://api.github.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL *url.URL
	// contains filtered or unexported fields
}

func NewAppClient

func NewAppClient(ctx context.Context, baseURL string, appID, installationID int64, privateKey []byte) (*Client, error)

func NewClient

func NewClient(httpClient *http.Client) *Client

func NewTokenClient

func NewTokenClient(ctx context.Context, token string) *Client

func (Client) Client

func (c Client) Client() *http.Client

func (Client) Do

func (c Client) Do(req *retryablehttp.Request) (*http.Response, error)

func (Client) NewRequest

func (c Client) NewRequest(method, path string, rawBody any) (*retryablehttp.Request, error)

Jump to

Keyboard shortcuts

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