doubles

package
v4.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterFinderStub

type AdapterFinderStub struct {
	AdapterByServiceTypeValue globalEntities.LocalGitAuthProvider
	AdapterByURLValue         globalEntities.LocalGitAuthProvider
	// AdaptersByURL answers GetAdapterByURL for the URLs it holds, ahead of AdapterByURLValue.
	AdaptersByURL map[string]globalEntities.LocalGitAuthProvider
}

AdapterFinderStub implements git.AdapterFinder for testing.

func (*AdapterFinderStub) GetAdapterByServiceType

func (*AdapterFinderStub) GetAdapterByURL

type AuthStub

type AuthStub struct{}

AuthStub is a dummy transport.AuthMethod for testing.

func (*AuthStub) Name

func (s *AuthStub) Name() string

func (*AuthStub) String

func (s *AuthStub) String() string

type AzureTenantResolverStub added in v4.7.0

type AzureTenantResolverStub struct {
	Tenant string
	Err    error
	// contains filtered or unexported fields
}

AzureTenantResolverStub is a recording credentials AzureTenantResolver that answers every organization with the same tenant or error, without network access.

func (*AzureTenantResolverStub) GetTenant added in v4.7.0

func (s *AzureTenantResolverStub) GetTenant(_ context.Context, organization string) (string, error)

GetTenant records the organization and returns the configured tenant or error.

func (*AzureTenantResolverStub) Organizations added in v4.7.0

func (s *AzureTenantResolverStub) Organizations() []string

Organizations returns every organization GetTenant was asked about.

type CLIRunnerStub added in v4.7.0

type CLIRunnerStub struct {
	// Paths maps a program name to the path LookPath returns. A name missing from it
	// fails with LookPathErr, or with exec.ErrNotFound when that is nil.
	Paths       map[string]string
	LookPathErr error
	// Token is what every Output call prints, unless OutputErr is set.
	Token     string
	OutputErr error
	// Block makes Output wait until its context ends, then return the context's error.
	Block bool
	// contains filtered or unexported fields
}

CLIRunnerStub is a recording credentials CLIRunner: it answers LookPath and Output with canned values and remembers every command it was asked to run.

func (*CLIRunnerStub) Calls added in v4.7.0

func (s *CLIRunnerStub) Calls() [][]string

Calls returns every command Output ran, each as the path followed by its arguments.

func (*CLIRunnerStub) LookPath added in v4.7.0

func (s *CLIRunnerStub) LookPath(name string) (string, error)

LookPath returns the configured path for name.

func (*CLIRunnerStub) Output added in v4.7.0

func (s *CLIRunnerStub) Output(ctx context.Context, path string, args ...string) (string, error)

Output records the command and returns the configured token or error.

type CommitSignerStub

type CommitSignerStub struct {
	SignatureValue string
	SignError      error
}

CommitSignerStub implements CommitSigner for testing.

func (*CommitSignerStub) Sign

func (s *CommitSignerStub) Sign(_ context.Context, _ []byte) (string, error)

type CredentialResolverStub added in v4.7.0

type CredentialResolverStub struct {
	Credential credentialEntities.Credential
	Err        error
	// contains filtered or unexported fields
}

CredentialResolverStub is a recording credentials CredentialResolver that answers every request with the same credential or error.

func (*CredentialResolverStub) Requests added in v4.7.0

Requests returns every request Resolve received.

func (*CredentialResolverStub) Resolve added in v4.7.0

Resolve records the request and returns the configured credential or error.

type ForgeProviderStub

type ForgeProviderStub struct {
	NameValue        string
	MatchURLValue    string
	TokenValue       string
	ServiceTypeValue globalEntities.ServiceType
	AuthMethodsValue []transport.AuthMethod
}

ForgeProviderStub implements ForgeProvider + LocalGitAuthProvider for testing.

func (*ForgeProviderStub) AuthToken

func (s *ForgeProviderStub) AuthToken() string

func (*ForgeProviderStub) CloneURL

func (*ForgeProviderStub) ClosePullRequest

func (s *ForgeProviderStub) ClosePullRequest(
	_ context.Context, _ globalEntities.Repository, _ string,
) (bool, error)

func (*ForgeProviderStub) ConfigureTransport

func (s *ForgeProviderStub) ConfigureTransport()

func (*ForgeProviderStub) DiscoverRepositories

func (s *ForgeProviderStub) DiscoverRepositories(
	_ context.Context, _ string,
) ([]globalEntities.Repository, error)

func (*ForgeProviderStub) GetAuthMethods

func (s *ForgeProviderStub) GetAuthMethods(_ string) []transport.AuthMethod

func (*ForgeProviderStub) GetServiceType

func (s *ForgeProviderStub) GetServiceType() globalEntities.ServiceType

func (*ForgeProviderStub) MatchesURL

func (s *ForgeProviderStub) MatchesURL(rawURL string) bool

func (*ForgeProviderStub) Name

func (s *ForgeProviderStub) Name() string

func (*ForgeProviderStub) PrepareCloneURL

func (s *ForgeProviderStub) PrepareCloneURL(url string) string

func (*ForgeProviderStub) PullRequestExists

func (s *ForgeProviderStub) PullRequestExists(
	_ context.Context, _ globalEntities.Repository, _ string,
) (bool, error)

func (*ForgeProviderStub) SSHCloneURL

type MirrorProviderStub

type MirrorProviderStub struct {
	*ForgeProviderStub

	MigrateErr error
	Migrated   []globalEntities.MirrorInput
}

MirrorProviderStub implements MirrorProvider for testing.

func (*MirrorProviderStub) MigrateRepository

func (s *MirrorProviderStub) MigrateRepository(
	_ context.Context,
	input globalEntities.MirrorInput,
) error

type RepositoryDiscovererStub

type RepositoryDiscovererStub struct {
	NameValue string
}

RepositoryDiscovererStub implements RepositoryDiscoverer for testing.

func (*RepositoryDiscovererStub) DiscoverRepositories

func (s *RepositoryDiscovererStub) DiscoverRepositories(
	_ context.Context, _ string,
) ([]globalEntities.Repository, error)

func (*RepositoryDiscovererStub) Name

func (s *RepositoryDiscovererStub) Name() string

Jump to

Keyboard shortcuts

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