Back to godoc.org

Package github

v0.20.5
Latest Go to latest

The latest major version is .

Published: Jul 24, 2020 | License: Apache-2.0 | Module: github.com/bufbuild/buf

Overview

Package github provides TESTING functionality for GitHub.

This should eventually be refactored to provide universal functionality.

Index

type ArchiveReader

type ArchiveReader interface {
	// GetArchive gets the GitHub archive and untars it to the output directory path.
	//
	// The root directory within the tarball is stripped.
	// If the directory already exists, this is a no-op.
	//
	// Only use for testing.
	GetArchive(
		ctx context.Context,
		container app.EnvStdinContainer,
		outputDirPath string,
		owner string,
		repository string,
		ref string,
	) error
}

ArchiveReader reads GitHub archives.

func NewArchiveReader

func NewArchiveReader(
	logger *zap.Logger,
	httpClient *http.Client,
	httpAuthenticator httpauth.Authenticator,
) ArchiveReader

NewArchiveReader returns a new ArchiveReader.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier