gh

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespectRate

func RespectRate(ctx context.Context, c *github.Client) error

Types

type Client

type Client struct {
	REST *github.Client

	// GraphQLURL is the endpoint used by DoGraphQL. Empty means GitHub's public
	// GraphQL API. Tests may override it to point at a local server.
	GraphQLURL string
	// contains filtered or unexported fields
}

func NewClientFromEnv

func NewClientFromEnv(ctx context.Context, app config.AppConfig) (*Client, string, error)

func NewClientWithHTTP added in v0.4.2

func NewClientWithHTTP(rest *github.Client, httpClient *http.Client, graphQLURL string) *Client

NewClientWithHTTP builds a Client around an HTTP client the caller already has.

DoGraphQL needs that client and the field is unexported, so without this there is no way to construct a GraphQL-capable Client outside this package — which left the GraphQL paths untestable.

func (*Client) DoGraphQL added in v0.1.13

func (c *Client) DoGraphQL(ctx context.Context, query string, variables map[string]any, result any) error

DoGraphQL executes a GraphQL query or mutation

Jump to

Keyboard shortcuts

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