github

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 10 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 {
	ListIssues(ctx context.Context, repoOwner, repoName string) ([]*Issue, error)
	ListLeastRecentlyUpdatedIssues(ctx context.Context, repoOwner, repoName string, numOfIssues int, deadline string) ([]*Issue, error)
	CreateIssue(ctx context.Context, repoOwner, repoName string, param *IssueRequest) (*GitHubIssue, error)
	CloseIssue(ctx context.Context, repoOwner, repoName string, issueNumber int) (*GitHubIssue, error)
	GetIssue(ctx context.Context, repoOwner, repoName, title string) (*Issue, error)
	ArchiveIssue(ctx context.Context, repoOwner, repoName string, issueNumber int, title string) (*GitHubIssue, error)
}

type ClientImpl

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

func New

func New(ctx context.Context, param *ParamNew) (*ClientImpl, error)

func (*ClientImpl) ArchiveIssue added in v0.1.1

func (cl *ClientImpl) ArchiveIssue(ctx context.Context, repoOwner, repoName string, issueNumber int, title string) (*GitHubIssue, error)

func (*ClientImpl) CloseIssue

func (cl *ClientImpl) CloseIssue(ctx context.Context, repoOwner, repoName string, issueNumber int) (*GitHubIssue, error)

func (*ClientImpl) CreateIssue

func (cl *ClientImpl) CreateIssue(ctx context.Context, repoOwner, repoName string, issue *IssueRequest) (*GitHubIssue, error)

func (*ClientImpl) GetIssue added in v0.1.1

func (cl *ClientImpl) GetIssue(ctx context.Context, repoOwner, repoName, title string) (*Issue, error)

func (*ClientImpl) ListIssues

func (cl *ClientImpl) ListIssues(ctx context.Context, repoOwner, repoName string) ([]*Issue, error)

func (*ClientImpl) ListLeastRecentlyUpdatedIssues

func (cl *ClientImpl) ListLeastRecentlyUpdatedIssues(ctx context.Context, repoOwner, repoName string, numOfIssues int, deadline string) ([]*Issue, error)

type GitHubIssue

type GitHubIssue = github.Issue //nolint:revive

type Issue

type Issue struct {
	Number int    `json:"number,omitempty"`
	Title  string `json:"title,omitempty"`
	Target string `json:"target,omitempty"`
	State  string `json:"state,omitempty"`
	RunsOn string `json:"runs_on,omitempty"`
}

type IssueClient

type IssueClient interface {
	Create(ctx context.Context, owner string, repo string, issue *IssueRequest) (*GitHubIssue, *Response, error)
	Edit(ctx context.Context, owner string, repo string, issueNumber int, issue *IssueRequest) (*GitHubIssue, *Response, error)
}

type IssueRequest

type IssueRequest = github.IssueRequest

type ListOptions

type ListOptions = github.ListOptions

type MockClient added in v0.1.5

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient added in v0.1.5

func NewMockClient(t mockConstructorTestingTNewMockClient) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockClient) ArchiveIssue added in v0.1.5

func (_m *MockClient) ArchiveIssue(ctx context.Context, repoOwner string, repoName string, issueNumber int, title string) (*v51github.Issue, error)

ArchiveIssue provides a mock function with given fields: ctx, repoOwner, repoName, issueNumber, title

func (*MockClient) CloseIssue added in v0.1.5

func (_m *MockClient) CloseIssue(ctx context.Context, repoOwner string, repoName string, issueNumber int) (*v51github.Issue, error)

CloseIssue provides a mock function with given fields: ctx, repoOwner, repoName, issueNumber

func (*MockClient) CreateIssue added in v0.1.5

func (_m *MockClient) CreateIssue(ctx context.Context, repoOwner string, repoName string, param *v51github.IssueRequest) (*v51github.Issue, error)

CreateIssue provides a mock function with given fields: ctx, repoOwner, repoName, param

func (*MockClient) EXPECT added in v0.1.5

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) GetIssue added in v0.1.5

func (_m *MockClient) GetIssue(ctx context.Context, repoOwner string, repoName string, title string) (*Issue, error)

GetIssue provides a mock function with given fields: ctx, repoOwner, repoName, title

func (*MockClient) ListIssues added in v0.1.5

func (_m *MockClient) ListIssues(ctx context.Context, repoOwner string, repoName string) ([]*Issue, error)

ListIssues provides a mock function with given fields: ctx, repoOwner, repoName

func (*MockClient) ListLeastRecentlyUpdatedIssues added in v0.1.5

func (_m *MockClient) ListLeastRecentlyUpdatedIssues(ctx context.Context, repoOwner string, repoName string, numOfIssues int, deadline string) ([]*Issue, error)

ListLeastRecentlyUpdatedIssues provides a mock function with given fields: ctx, repoOwner, repoName, numOfIssues, deadline

type MockClient_ArchiveIssue_Call added in v0.1.5

type MockClient_ArchiveIssue_Call struct {
	*mock.Call
}

MockClient_ArchiveIssue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ArchiveIssue'

func (*MockClient_ArchiveIssue_Call) Return added in v0.1.5

func (*MockClient_ArchiveIssue_Call) Run added in v0.1.5

func (_c *MockClient_ArchiveIssue_Call) Run(run func(ctx context.Context, repoOwner string, repoName string, issueNumber int, title string)) *MockClient_ArchiveIssue_Call

func (*MockClient_ArchiveIssue_Call) RunAndReturn added in v0.1.5

type MockClient_CloseIssue_Call added in v0.1.5

type MockClient_CloseIssue_Call struct {
	*mock.Call
}

MockClient_CloseIssue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseIssue'

func (*MockClient_CloseIssue_Call) Return added in v0.1.5

func (*MockClient_CloseIssue_Call) Run added in v0.1.5

func (_c *MockClient_CloseIssue_Call) Run(run func(ctx context.Context, repoOwner string, repoName string, issueNumber int)) *MockClient_CloseIssue_Call

func (*MockClient_CloseIssue_Call) RunAndReturn added in v0.1.5

type MockClient_CreateIssue_Call added in v0.1.5

type MockClient_CreateIssue_Call struct {
	*mock.Call
}

MockClient_CreateIssue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateIssue'

func (*MockClient_CreateIssue_Call) Return added in v0.1.5

func (*MockClient_CreateIssue_Call) Run added in v0.1.5

func (_c *MockClient_CreateIssue_Call) Run(run func(ctx context.Context, repoOwner string, repoName string, param *v51github.IssueRequest)) *MockClient_CreateIssue_Call

func (*MockClient_CreateIssue_Call) RunAndReturn added in v0.1.5

type MockClient_Expecter added in v0.1.5

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

func (*MockClient_Expecter) ArchiveIssue added in v0.1.5

func (_e *MockClient_Expecter) ArchiveIssue(ctx interface{}, repoOwner interface{}, repoName interface{}, issueNumber interface{}, title interface{}) *MockClient_ArchiveIssue_Call

ArchiveIssue is a helper method to define mock.On call

  • ctx context.Context
  • repoOwner string
  • repoName string
  • issueNumber int
  • title string

func (*MockClient_Expecter) CloseIssue added in v0.1.5

func (_e *MockClient_Expecter) CloseIssue(ctx interface{}, repoOwner interface{}, repoName interface{}, issueNumber interface{}) *MockClient_CloseIssue_Call

CloseIssue is a helper method to define mock.On call

  • ctx context.Context
  • repoOwner string
  • repoName string
  • issueNumber int

func (*MockClient_Expecter) CreateIssue added in v0.1.5

func (_e *MockClient_Expecter) CreateIssue(ctx interface{}, repoOwner interface{}, repoName interface{}, param interface{}) *MockClient_CreateIssue_Call

CreateIssue is a helper method to define mock.On call

  • ctx context.Context
  • repoOwner string
  • repoName string
  • param *v51github.IssueRequest

func (*MockClient_Expecter) GetIssue added in v0.1.5

func (_e *MockClient_Expecter) GetIssue(ctx interface{}, repoOwner interface{}, repoName interface{}, title interface{}) *MockClient_GetIssue_Call

GetIssue is a helper method to define mock.On call

  • ctx context.Context
  • repoOwner string
  • repoName string
  • title string

func (*MockClient_Expecter) ListIssues added in v0.1.5

func (_e *MockClient_Expecter) ListIssues(ctx interface{}, repoOwner interface{}, repoName interface{}) *MockClient_ListIssues_Call

ListIssues is a helper method to define mock.On call

  • ctx context.Context
  • repoOwner string
  • repoName string

func (*MockClient_Expecter) ListLeastRecentlyUpdatedIssues added in v0.1.5

func (_e *MockClient_Expecter) ListLeastRecentlyUpdatedIssues(ctx interface{}, repoOwner interface{}, repoName interface{}, numOfIssues interface{}, deadline interface{}) *MockClient_ListLeastRecentlyUpdatedIssues_Call

ListLeastRecentlyUpdatedIssues is a helper method to define mock.On call

  • ctx context.Context
  • repoOwner string
  • repoName string
  • numOfIssues int
  • deadline string

type MockClient_GetIssue_Call added in v0.1.5

type MockClient_GetIssue_Call struct {
	*mock.Call
}

MockClient_GetIssue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIssue'

func (*MockClient_GetIssue_Call) Return added in v0.1.5

func (*MockClient_GetIssue_Call) Run added in v0.1.5

func (_c *MockClient_GetIssue_Call) Run(run func(ctx context.Context, repoOwner string, repoName string, title string)) *MockClient_GetIssue_Call

func (*MockClient_GetIssue_Call) RunAndReturn added in v0.1.5

type MockClient_ListIssues_Call added in v0.1.5

type MockClient_ListIssues_Call struct {
	*mock.Call
}

MockClient_ListIssues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIssues'

func (*MockClient_ListIssues_Call) Return added in v0.1.5

func (*MockClient_ListIssues_Call) Run added in v0.1.5

func (_c *MockClient_ListIssues_Call) Run(run func(ctx context.Context, repoOwner string, repoName string)) *MockClient_ListIssues_Call

func (*MockClient_ListIssues_Call) RunAndReturn added in v0.1.5

type MockClient_ListLeastRecentlyUpdatedIssues_Call added in v0.1.5

type MockClient_ListLeastRecentlyUpdatedIssues_Call struct {
	*mock.Call
}

MockClient_ListLeastRecentlyUpdatedIssues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLeastRecentlyUpdatedIssues'

func (*MockClient_ListLeastRecentlyUpdatedIssues_Call) Return added in v0.1.5

func (*MockClient_ListLeastRecentlyUpdatedIssues_Call) Run added in v0.1.5

func (*MockClient_ListLeastRecentlyUpdatedIssues_Call) RunAndReturn added in v0.1.5

type ParamNew

type ParamNew struct {
	Token              string
	GHEBaseURL         string
	GHEGraphQLEndpoint string
}

type Response

type Response = github.Response

Jump to

Keyboard shortcuts

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