githubapi

package
v0.0.0-...-2853fc3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchQuery

func BatchQuery[T any](ctx context.Context, client *Client, queries map[string]string, vars map[string]any) (map[string]T, error)

Types

type Client

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

func NewClient

func NewClient(config configuration.GitHub) (*Client, error)

func (*Client) GraphQL

func (c *Client) GraphQL() *githubv4.Client

func (*Client) Rest

func (c *Client) Rest() *github.Client

type ClientWrapper

type ClientWrapper struct {
	Cache  *cache.Cache
	Client *Client

	Repositories  *RepositoriesServiceWrapper
	Organizations *OrganizationsServiceWrapper
	Issues        *IssuesServiceWrapper
	GraphQL       *GraphQLWrapper
	// contains filtered or unexported fields
}

func NewClientWrapper

func NewClientWrapper(client *Client, cache *cache.Cache) *ClientWrapper

type GraphQLWrapper

type GraphQLWrapper ServiceWrapper

func (*GraphQLWrapper) FetchContributorInfo

func (ql *GraphQLWrapper) FetchContributorInfo(ctx context.Context, repo string, contributors []*github.Contributor) (map[string]model.ContributorInfo, error)

type IssuesServiceWrapper

type IssuesServiceWrapper ServiceWrapper

func (*IssuesServiceWrapper) ListByRepo

func (s *IssuesServiceWrapper) ListByRepo(ctx context.Context, owner string, repository string, opts *github.IssueListByRepoOptions) ([]*github.Issue, error)

func (*IssuesServiceWrapper) ListComments

func (s *IssuesServiceWrapper) ListComments(ctx context.Context, owner string, repository string, number int, opts *github.IssueListCommentsOptions) ([]*github.IssueComment, error)

type OrganizationsServiceWrapper

type OrganizationsServiceWrapper ServiceWrapper

func (*OrganizationsServiceWrapper) Get

func (*OrganizationsServiceWrapper) List

type RepositoriesServiceWrapper

type RepositoriesServiceWrapper ServiceWrapper

func (*RepositoriesServiceWrapper) Get

func (*RepositoriesServiceWrapper) GetCommit

func (s *RepositoriesServiceWrapper) GetCommit(ctx context.Context, owner string, repository string, sha string, opts *github.ListOptions) (*github.RepositoryCommit, error)

func (*RepositoriesServiceWrapper) GetReadMe

func (*RepositoriesServiceWrapper) List

func (*RepositoriesServiceWrapper) ListCommits

func (s *RepositoriesServiceWrapper) ListCommits(ctx context.Context, owner string, repository string, opts *github.CommitsListOptions) ([]*github.RepositoryCommit, error)

func (*RepositoriesServiceWrapper) ListContributorStats

func (s *RepositoriesServiceWrapper) ListContributorStats(ctx context.Context, owner string, repository string) ([]*github.ContributorStats, error)

func (*RepositoriesServiceWrapper) ListContributors

func (s *RepositoriesServiceWrapper) ListContributors(ctx context.Context, owner string, repository string, opts *github.ListContributorsOptions) ([]*github.Contributor, error)

func (*RepositoriesServiceWrapper) ListReleases

func (s *RepositoriesServiceWrapper) ListReleases(ctx context.Context, owner string, repository string, opts *github.ListOptions) ([]*github.RepositoryRelease, error)

func (*RepositoriesServiceWrapper) ListTags

func (s *RepositoriesServiceWrapper) ListTags(ctx context.Context, owner string, repository string, opts *github.ListOptions) ([]*github.RepositoryTag, error)

type ServiceWrapper

type ServiceWrapper struct {
	Cache  *cache.Cache
	Client *Client
}

Jump to

Keyboard shortcuts

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