github

package
v0.4.3-final-apache Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClientLoader = func(token string) Client {
	return &ClientAdapter{gh.NewClient(nil).WithAuthToken(token)}
}

Functions

func Plugin

func Plugin(version string, clientLoader ClientLoaderFn) *plugin.Schema

Types

type Client

type Client interface {
	Issues() IssuesClient
	Gists() GistClient
}

type ClientAdapter

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

func (*ClientAdapter) Gists

func (c *ClientAdapter) Gists() GistClient

func (*ClientAdapter) Issues

func (c *ClientAdapter) Issues() IssuesClient

type ClientLoaderFn

type ClientLoaderFn func(token string) Client

type GistClient

type GistClient interface {
	Create(ctx context.Context, gist *gh.Gist) (*gh.Gist, *gh.Response, error)
	Get(ctx context.Context, id string) (*gh.Gist, *gh.Response, error)
	Edit(ctx context.Context, id string, gist *gh.Gist) (*gh.Gist, *gh.Response, error)
}

type IssuesClient

type IssuesClient interface {
	ListByRepo(ctx context.Context, owner, repo string, opts *gh.IssueListByRepoOptions) ([]*gh.Issue, *gh.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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