Help us shape the future of Go! Take the 2026 Go Developer Survey

legacy

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetRepositoryContents
	//
	// Fetches a specific file/folder in a github repo on a given branch.
	GetRepositoryContents(ctx context.Context, req GetRepositoryContentsRequest) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)

	// GetRepositoryReleases
	//
	// Get all releases from a given repository.
	GetRepositoryReleases(ctx context.Context, req CommonRequest) ([]*github.RepositoryRelease, *github.Response, error)

	// GetBranch
	//
	// Returns a branch given a branch name.
	GetBranch(ctx context.Context, req GetBranchRequest) (*github.Reference, *github.Response, error)

	// CreatePullRequest
	//
	// Creates a Pull Requests on a given repository.
	CreatePullRequest(ctx context.Context, req CreatePRRequest) (*github.PullRequest, *github.Response, error)

	// CreateBranch
	//
	// Creates a branch on a given repository.
	CreateBranch(ctx context.Context, req CreateBranchRequest) (*github.Reference, *github.Response, error)

	// UpdateFile
	//
	// Updates a file in a given repo with new content.
	UpdateFile(ctx context.Context, req UpdateFileRequest) (*github.RepositoryContentResponse, *github.Response, error)
}

type ClientSet

type ClientSet struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, accessToken string) *ClientSet

func (*ClientSet) CreateBranch

func (*ClientSet) CreatePullRequest

func (c *ClientSet) CreatePullRequest(ctx context.Context, req CreatePRRequest) (*github.PullRequest, *github.Response, error)

func (*ClientSet) GetBranch

func (*ClientSet) GetRepositoryContents

func (c *ClientSet) GetRepositoryContents(ctx context.Context, req GetRepositoryContentsRequest) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)

func (*ClientSet) GetRepositoryReleases

func (c *ClientSet) GetRepositoryReleases(ctx context.Context, req CommonRequest) ([]*github.RepositoryRelease, *github.Response, error)

type CommonRequest

type CommonRequest struct {
	Owner string
	Repo  string
}

type CreateBranchRequest

type CreateBranchRequest struct {
	Owner string
	Repo  string
	*github.Reference
}

type CreatePRRequest

type CreatePRRequest struct {
	Owner string
	Repo  string
	*github.NewPullRequest
}

type GetBranchRequest

type GetBranchRequest struct {
	Owner      string
	Repo       string
	BranchName string
}

type GetReleaseRequest

type GetReleaseRequest struct {
	Owner     string
	Repo      string
	ReleaseID int64
}

type GetRepositoryContentsRequest

type GetRepositoryContentsRequest struct {
	Owner  string
	Repo   string
	Path   string
	Branch string
}

type UpdateFileRequest

type UpdateFileRequest struct {
	Owner    string
	Repo     string
	FilePath string
	*github.RepositoryContentFileOptions
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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