factory

package
v39.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient(opts ...Option) (*github.Client, error)

NewGithubClient returns github.com/google/go-github/v39/github.Client with environment variable resolution

Types

type Config

type Config struct {
	Token               string
	Endpoint            string
	DialTimeout         time.Duration
	TLSHandshakeTimeout time.Duration
	Timeout             time.Duration
	HTTPClient          *http.Client
}

type Option

type Option func(*Config) error

func DialTimeout

func DialTimeout(to time.Duration) Option

func Endpoint

func Endpoint(t string) Option

func HTTPClient added in v39.2.1

func HTTPClient(httpClient *http.Client) Option

func TLSHandshakeTimeout

func TLSHandshakeTimeout(to time.Duration) Option

func Timeout

func Timeout(to time.Duration) Option

func Token

func Token(t string) Option

Jump to

Keyboard shortcuts

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