client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileNotFound = errors.New("file not found in remote repo")
)

Errors relating to client operations.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetFile(ctx context.Context, opts *Options, path string) (contents string, err error)
	UpdateFile(ctx context.Context, opts *Options, path string, msg string, contents []byte) error
	CreateRef(ctx context.Context, opts *Options) error
	CreatePullRequest(ctx context.Context, opts *Options, title, body string) error
}

The Client interface defines a way to interact with a source repository to be able to perform operations on Helm Charts and other project files.

func NewGitHubClient

func NewGitHubClient(ctx context.Context, token string) (Client, error)

NewGitHubClient creates a new GitHub client.

type Options

type Options struct {
	Ref         string
	Base        string
	RepoName    string
	RepoOwner   string
	AuthorName  string
	AuthorEmail string
}

Options are the configuration options and state required to create a new client.

Jump to

Keyboard shortcuts

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