gh

package
v0.0.0-...-b6f9656 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCredentialGetter credentials.CredentialGetter = defaultCredentials()

DefaultCredentialGetter implements retrieving credentials from a netrc formatted file, with a location of ~/.netrc

View Source
var Logger = logrus.New()

Logger provides the default logger for the whole maiao project

Functions

func GitHubAPIDomain

func GitHubAPIDomain(domain string) string

func NewClient

func NewClient(httpClient *http.Client, domain string) (*github.Client, error)

NewClient instanciates a new github client depending on the domain name

When requesting a client for a different host than github.com, a client for github enterprise is considered

Credentials are even taken from GITHUB_TOKEN environment variable or from your ~/.netrc file

func NewGraphQLClient

func NewGraphQLClient(httpClient *http.Client, domain string) (*api.GraphQLClient, error)

func NewHTTPClientForDomain

func NewHTTPClientForDomain(ctx context.Context, domain string) (*http.Client, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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