github_config

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// BaseUrl is where the API is reached. Defaults to GitHub's own.
	BaseUrl *url.URL
	// ArchiveBaseUrl is where commit archives are reached. It is separate
	// because they are served by the web host rather than the API.
	ArchiveBaseUrl *url.URL
	FetchOptions   []fetch_config.Option
}

func New

func New(options ...Option) *Config

type Option

type Option func(*Config)

func WithArchiveBaseUrl

func WithArchiveBaseUrl(archiveBaseUrl *url.URL) Option

func WithBaseUrl

func WithBaseUrl(baseUrl *url.URL) Option

func WithFetchOptions

func WithFetchOptions(fetchOptions ...fetch_config.Option) Option

func WithToken

func WithToken(token string) Option

WithToken authenticates requests, which raises the rate limit and is what reaching a private repository needs.

Jump to

Keyboard shortcuts

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