Documentation ¶
Index ¶
- type CargoClient
- type CargoVersionGetter
- type Filter
- type FuzzyFinder
- type FuzzyGetter
- type GeneralVersionGetter
- type GitHubReleaseClient
- type GitHubReleaseVersionGetter
- type GitHubTagClient
- type GitHubTagVersionGetter
- type MockCargoClient
- type MockFuzzyGetter
- type MockGitHubReleaseClient
- func (g *MockGitHubReleaseClient) GetLatestRelease(ctx context.Context, repoOwner, repoName string) (*github.RepositoryRelease, *github.Response, error)
- func (g *MockGitHubReleaseClient) ListReleases(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error)
- type MockGitHubTagClient
- type MockVersionGetter
- type VersionGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CargoClient ¶
type CargoVersionGetter ¶
type CargoVersionGetter struct {
// contains filtered or unexported fields
}
func NewCargo ¶
func NewCargo(client CargoClient) *CargoVersionGetter
func (*CargoVersionGetter) Get ¶
func (c *CargoVersionGetter) Get(ctx context.Context, _ *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter) (string, error)
func (*CargoVersionGetter) List ¶
func (c *CargoVersionGetter) List(ctx context.Context, _ *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter, limit int) ([]*fuzzyfinder.Item, error)
type FuzzyFinder ¶
type FuzzyFinder interface { Find(items []*fuzzyfinder.Item, hasPreview bool) (int, error) FindMulti(items []*fuzzyfinder.Item, hasPreview bool) ([]int, error) }
type FuzzyGetter ¶
type FuzzyGetter struct {
// contains filtered or unexported fields
}
func NewFuzzy ¶
func NewFuzzy(finder FuzzyFinder, getter VersionGetter) *FuzzyGetter
type GeneralVersionGetter ¶
type GeneralVersionGetter struct {
// contains filtered or unexported fields
}
func NewGeneralVersionGetter ¶
func NewGeneralVersionGetter(cargo *CargoVersionGetter, ghTag *GitHubTagVersionGetter, ghRelease *GitHubReleaseVersionGetter) *GeneralVersionGetter
func (*GeneralVersionGetter) Get ¶
func (g *GeneralVersionGetter) Get(ctx context.Context, logE *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter) (string, error)
func (*GeneralVersionGetter) List ¶
func (g *GeneralVersionGetter) List(ctx context.Context, logE *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter, limit int) ([]*fuzzyfinder.Item, error)
type GitHubReleaseClient ¶
type GitHubReleaseVersionGetter ¶
type GitHubReleaseVersionGetter struct {
// contains filtered or unexported fields
}
func NewGitHubRelease ¶
func NewGitHubRelease(gh GitHubReleaseClient) *GitHubReleaseVersionGetter
func (*GitHubReleaseVersionGetter) Get ¶
func (g *GitHubReleaseVersionGetter) Get(ctx context.Context, logE *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter) (string, error)
func (*GitHubReleaseVersionGetter) List ¶
func (g *GitHubReleaseVersionGetter) List(ctx context.Context, logE *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter, limit int) ([]*fuzzyfinder.Item, error)
type GitHubTagClient ¶
type GitHubTagVersionGetter ¶
type GitHubTagVersionGetter struct {
// contains filtered or unexported fields
}
func NewGitHubTag ¶
func NewGitHubTag(gh GitHubTagClient) *GitHubTagVersionGetter
func (*GitHubTagVersionGetter) Get ¶
func (g *GitHubTagVersionGetter) Get(ctx context.Context, logE *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter) (string, error)
func (*GitHubTagVersionGetter) List ¶
func (g *GitHubTagVersionGetter) List(ctx context.Context, logE *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter, limit int) ([]*fuzzyfinder.Item, error)
type MockCargoClient ¶
type MockCargoClient struct {
// contains filtered or unexported fields
}
func NewMockCargoClient ¶
func NewMockCargoClient(versions map[string][]string) *MockCargoClient
func (*MockCargoClient) GetLatestVersion ¶
func (*MockCargoClient) ListVersions ¶
type MockFuzzyGetter ¶
type MockFuzzyGetter struct {
// contains filtered or unexported fields
}
func NewMockFuzzyGetter ¶
func NewMockFuzzyGetter(versions map[string]string) *MockFuzzyGetter
type MockGitHubReleaseClient ¶
type MockGitHubReleaseClient struct {
// contains filtered or unexported fields
}
func NewMockGitHubReleaseClient ¶
func NewMockGitHubReleaseClient(releases map[string][]*github.RepositoryRelease) *MockGitHubReleaseClient
func (*MockGitHubReleaseClient) GetLatestRelease ¶
func (g *MockGitHubReleaseClient) GetLatestRelease(ctx context.Context, repoOwner, repoName string) (*github.RepositoryRelease, *github.Response, error)
func (*MockGitHubReleaseClient) ListReleases ¶
func (g *MockGitHubReleaseClient) ListReleases(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error)
type MockGitHubTagClient ¶
type MockGitHubTagClient struct {
// contains filtered or unexported fields
}
func NewMockGitHubTagClient ¶
func NewMockGitHubTagClient(tags map[string][]*github.RepositoryTag) *MockGitHubTagClient
func (*MockGitHubTagClient) ListTags ¶
func (g *MockGitHubTagClient) ListTags(ctx context.Context, owner string, repo string, opts *github.ListOptions) ([]*github.RepositoryTag, *github.Response, error)
type MockVersionGetter ¶
type MockVersionGetter struct {
// contains filtered or unexported fields
}
func NewMockVersionGetter ¶
func NewMockVersionGetter(versions map[string][]*fuzzyfinder.Item) *MockVersionGetter
func (*MockVersionGetter) Get ¶
func (g *MockVersionGetter) Get(ctx context.Context, _ *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter) (string, error)
func (*MockVersionGetter) List ¶
func (g *MockVersionGetter) List(ctx context.Context, _ *logrus.Entry, pkg *registry.PackageInfo, filters []*Filter, limit int) ([]*fuzzyfinder.Item, error)
Click to show internal directories.
Click to hide internal directories.