Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Transport ¶
type Transport struct { BaseURL string // baseURL is the scheme and host for GitHub API, defaults to https://api.github.com // contains filtered or unexported fields }
Transport provides a http.RoundTripper by wrapping an existing http.RoundTripper and provides GitHub App authentication as an installation.
func NewTransport ¶
func NewTransport(tr http.RoundTripper, appID, installationID int64, privateKey []byte) (*Transport, error)
NewTransport returns an Transport using private key. The key is parsed and if any errors occur the transport is nil and error is non-nil.
The provided tr http.RoundTripper should be shared between multiple installations to ensure reuse of underlying TCP connections.
The returned Transport is safe to be used concurrently.
func NewTransportFromKeyFile ¶
func NewTransportFromKeyFile(tr http.RoundTripper, appID, installationID int64, privateKeyFile string) (*Transport, error)
NewTransportFromKeyFile returns an Transport using a private key from file.
Click to show internal directories.
Click to hide internal directories.