git

package
v0.0.0-...-29a10c6 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 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 {
	Start(ctx context.Context)
	IsInitialized() bool
	Get() any
	GetMyUserInfo() (*gittypes.User, *gittypes.Response, error)
	DeleteRepo(owner string, repo string) (*gittypes.Response, error)
	GetRepo(userName string, repoCRName string) (*gittypes.Repository, *gittypes.Response, error)
	CreateRepo(createRepoOption gittypes.CreateRepoOption) (*gittypes.Repository, *gittypes.Response, error)
	EditRepo(userName string, repoCRName string, editRepoOption gittypes.EditRepoOption) (*gittypes.Repository, *gittypes.Response, error)
	DeleteAccessToken(value interface{}) (*gittypes.Response, error)
	ListAccessTokens(opts gittypes.ListAccessTokensOptions) ([]*gittypes.AccessToken, *gittypes.Response, error)
	CreateAccessToken(opt gittypes.CreateAccessTokenOption) (*gittypes.AccessToken, *gittypes.Response, error)
}

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*MockClient) CreateAccessToken

func (_m *MockClient) CreateAccessToken(opt types.CreateAccessTokenOption) (*types.AccessToken, *types.Response, error)

CreateAccessToken provides a mock function with given fields: opt

func (*MockClient) CreateRepo

func (_m *MockClient) CreateRepo(createRepoOption types.CreateRepoOption) (*types.Repository, *types.Response, error)

CreateRepo provides a mock function with given fields: createRepoOption

func (*MockClient) DeleteAccessToken

func (_m *MockClient) DeleteAccessToken(value interface{}) (*types.Response, error)

DeleteAccessToken provides a mock function with given fields: value

func (*MockClient) DeleteRepo

func (_m *MockClient) DeleteRepo(owner string, repo string) (*types.Response, error)

DeleteRepo provides a mock function with given fields: owner, repo

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) EditRepo

func (_m *MockClient) EditRepo(userName string, repoCRName string, editRepoOption types.EditRepoOption) (*types.Repository, *types.Response, error)

EditRepo provides a mock function with given fields: userName, repoCRName, editRepoOption

func (*MockClient) Get

func (_m *MockClient) Get() interface{}

Get provides a mock function with no fields

func (*MockClient) GetMyUserInfo

func (_m *MockClient) GetMyUserInfo() (*types.User, *types.Response, error)

GetMyUserInfo provides a mock function with no fields

func (*MockClient) GetRepo

func (_m *MockClient) GetRepo(userName string, repoCRName string) (*types.Repository, *types.Response, error)

GetRepo provides a mock function with given fields: userName, repoCRName

func (*MockClient) IsInitialized

func (_m *MockClient) IsInitialized() bool

IsInitialized provides a mock function with no fields

func (*MockClient) ListAccessTokens

func (_m *MockClient) ListAccessTokens(opts types.ListAccessTokensOptions) ([]*types.AccessToken, *types.Response, error)

ListAccessTokens provides a mock function with given fields: opts

func (*MockClient) Start

func (_m *MockClient) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

type MockClient_CreateAccessToken_Call

type MockClient_CreateAccessToken_Call struct {
	*mock.Call
}

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

func (*MockClient_CreateAccessToken_Call) Return

func (*MockClient_CreateAccessToken_Call) Run

func (*MockClient_CreateAccessToken_Call) RunAndReturn

type MockClient_CreateRepo_Call

type MockClient_CreateRepo_Call struct {
	*mock.Call
}

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

func (*MockClient_CreateRepo_Call) Return

func (*MockClient_CreateRepo_Call) Run

func (_c *MockClient_CreateRepo_Call) Run(run func(createRepoOption types.CreateRepoOption)) *MockClient_CreateRepo_Call

func (*MockClient_CreateRepo_Call) RunAndReturn

type MockClient_DeleteAccessToken_Call

type MockClient_DeleteAccessToken_Call struct {
	*mock.Call
}

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

func (*MockClient_DeleteAccessToken_Call) Return

func (*MockClient_DeleteAccessToken_Call) Run

func (_c *MockClient_DeleteAccessToken_Call) Run(run func(value interface{})) *MockClient_DeleteAccessToken_Call

func (*MockClient_DeleteAccessToken_Call) RunAndReturn

func (_c *MockClient_DeleteAccessToken_Call) RunAndReturn(run func(interface{}) (*types.Response, error)) *MockClient_DeleteAccessToken_Call

type MockClient_DeleteRepo_Call

type MockClient_DeleteRepo_Call struct {
	*mock.Call
}

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

func (*MockClient_DeleteRepo_Call) Return

func (*MockClient_DeleteRepo_Call) Run

func (_c *MockClient_DeleteRepo_Call) Run(run func(owner string, repo string)) *MockClient_DeleteRepo_Call

func (*MockClient_DeleteRepo_Call) RunAndReturn

type MockClient_EditRepo_Call

type MockClient_EditRepo_Call struct {
	*mock.Call
}

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

func (*MockClient_EditRepo_Call) Return

func (*MockClient_EditRepo_Call) Run

func (_c *MockClient_EditRepo_Call) Run(run func(userName string, repoCRName string, editRepoOption types.EditRepoOption)) *MockClient_EditRepo_Call

func (*MockClient_EditRepo_Call) RunAndReturn

type MockClient_Expecter

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

func (*MockClient_Expecter) CreateAccessToken

func (_e *MockClient_Expecter) CreateAccessToken(opt interface{}) *MockClient_CreateAccessToken_Call

CreateAccessToken is a helper method to define mock.On call

  • opt types.CreateAccessTokenOption

func (*MockClient_Expecter) CreateRepo

func (_e *MockClient_Expecter) CreateRepo(createRepoOption interface{}) *MockClient_CreateRepo_Call

CreateRepo is a helper method to define mock.On call

  • createRepoOption types.CreateRepoOption

func (*MockClient_Expecter) DeleteAccessToken

func (_e *MockClient_Expecter) DeleteAccessToken(value interface{}) *MockClient_DeleteAccessToken_Call

DeleteAccessToken is a helper method to define mock.On call

  • value interface{}

func (*MockClient_Expecter) DeleteRepo

func (_e *MockClient_Expecter) DeleteRepo(owner interface{}, repo interface{}) *MockClient_DeleteRepo_Call

DeleteRepo is a helper method to define mock.On call

  • owner string
  • repo string

func (*MockClient_Expecter) EditRepo

func (_e *MockClient_Expecter) EditRepo(userName interface{}, repoCRName interface{}, editRepoOption interface{}) *MockClient_EditRepo_Call

EditRepo is a helper method to define mock.On call

  • userName string
  • repoCRName string
  • editRepoOption types.EditRepoOption

func (*MockClient_Expecter) Get

Get is a helper method to define mock.On call

func (*MockClient_Expecter) GetMyUserInfo

GetMyUserInfo is a helper method to define mock.On call

func (*MockClient_Expecter) GetRepo

func (_e *MockClient_Expecter) GetRepo(userName interface{}, repoCRName interface{}) *MockClient_GetRepo_Call

GetRepo is a helper method to define mock.On call

  • userName string
  • repoCRName string

func (*MockClient_Expecter) IsInitialized

IsInitialized is a helper method to define mock.On call

func (*MockClient_Expecter) ListAccessTokens

func (_e *MockClient_Expecter) ListAccessTokens(opts interface{}) *MockClient_ListAccessTokens_Call

ListAccessTokens is a helper method to define mock.On call

  • opts types.ListAccessTokensOptions

func (*MockClient_Expecter) Start

func (_e *MockClient_Expecter) Start(ctx interface{}) *MockClient_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context

type MockClient_GetMyUserInfo_Call

type MockClient_GetMyUserInfo_Call struct {
	*mock.Call
}

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

func (*MockClient_GetMyUserInfo_Call) Return

func (*MockClient_GetMyUserInfo_Call) Run

func (*MockClient_GetMyUserInfo_Call) RunAndReturn

type MockClient_GetRepo_Call

type MockClient_GetRepo_Call struct {
	*mock.Call
}

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

func (*MockClient_GetRepo_Call) Return

func (*MockClient_GetRepo_Call) Run

func (_c *MockClient_GetRepo_Call) Run(run func(userName string, repoCRName string)) *MockClient_GetRepo_Call

func (*MockClient_GetRepo_Call) RunAndReturn

type MockClient_Get_Call

type MockClient_Get_Call struct {
	*mock.Call
}

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

func (*MockClient_Get_Call) Return

func (_c *MockClient_Get_Call) Return(_a0 interface{}) *MockClient_Get_Call

func (*MockClient_Get_Call) Run

func (_c *MockClient_Get_Call) Run(run func()) *MockClient_Get_Call

func (*MockClient_Get_Call) RunAndReturn

func (_c *MockClient_Get_Call) RunAndReturn(run func() interface{}) *MockClient_Get_Call

type MockClient_IsInitialized_Call

type MockClient_IsInitialized_Call struct {
	*mock.Call
}

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

func (*MockClient_IsInitialized_Call) Return

func (*MockClient_IsInitialized_Call) Run

func (*MockClient_IsInitialized_Call) RunAndReturn

type MockClient_ListAccessTokens_Call

type MockClient_ListAccessTokens_Call struct {
	*mock.Call
}

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

func (*MockClient_ListAccessTokens_Call) Return

func (*MockClient_ListAccessTokens_Call) Run

func (*MockClient_ListAccessTokens_Call) RunAndReturn

type MockClient_Start_Call

type MockClient_Start_Call struct {
	*mock.Call
}

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

func (*MockClient_Start_Call) Return

func (*MockClient_Start_Call) Run

func (*MockClient_Start_Call) RunAndReturn

func (_c *MockClient_Start_Call) RunAndReturn(run func(context.Context)) *MockClient_Start_Call

type ProviderType

type ProviderType string

ProviderType represents the type of git provider

const (
	// ProviderGitea represents Gitea git provider
	ProviderGitea ProviderType = "gitea"
	// ProviderGitHub represents GitHub git provider
	ProviderGitHub ProviderType = "github"
	// ProviderGitLab represents GitLab git provider
	ProviderGitLab ProviderType = "gitlab"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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