Documentation
¶
Index ¶
- func SetAtmosConfig(config *schema.AtmosConfiguration)
- type GitHubClient
- type MockGitHubClient
- func (m *MockGitHubClient) GetLatestRelease(owner, repo string) (*go_github.RepositoryRelease, error)
- func (m *MockGitHubClient) GetRelease(owner, repo, tag string) (*go_github.RepositoryRelease, error)
- func (m *MockGitHubClient) GetReleases(owner, repo string, opts ReleaseOptions) ([]*go_github.RepositoryRelease, error)
- type RealGitHubClient
- func (c *RealGitHubClient) GetLatestRelease(owner, repo string) (*go_github.RepositoryRelease, error)
- func (c *RealGitHubClient) GetRelease(owner, repo, tag string) (*go_github.RepositoryRelease, error)
- func (c *RealGitHubClient) GetReleases(owner, repo string, opts ReleaseOptions) ([]*go_github.RepositoryRelease, error)
- type ReleaseOptions
- type VersionCommandProvider
- func (v *VersionCommandProvider) GetAliases() []internal.CommandAlias
- func (v *VersionCommandProvider) GetCommand() *cobra.Command
- func (v *VersionCommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag
- func (v *VersionCommandProvider) GetFlagsBuilder() flags.Builder
- func (v *VersionCommandProvider) GetGroup() string
- func (v *VersionCommandProvider) GetName() string
- func (v *VersionCommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder
- type VersionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAtmosConfig ¶
func SetAtmosConfig(config *schema.AtmosConfiguration)
SetAtmosConfig sets the Atmos configuration for the version command. This is called from root.go after atmosConfig is initialized.
Types ¶
type GitHubClient ¶
type GitHubClient interface {
GetReleases(owner, repo string, opts ReleaseOptions) ([]*go_github.RepositoryRelease, error)
GetRelease(owner, repo, tag string) (*go_github.RepositoryRelease, error)
GetLatestRelease(owner, repo string) (*go_github.RepositoryRelease, error)
}
GitHubClient interface for fetching releases (enables mocking).
type MockGitHubClient ¶
type MockGitHubClient struct {
Releases []*go_github.RepositoryRelease
Release *go_github.RepositoryRelease
Err error
}
MockGitHubClient for testing (no API calls).
func (*MockGitHubClient) GetLatestRelease ¶
func (m *MockGitHubClient) GetLatestRelease(owner, repo string) (*go_github.RepositoryRelease, error)
GetLatestRelease returns a mock latest release.
func (*MockGitHubClient) GetRelease ¶
func (m *MockGitHubClient) GetRelease(owner, repo, tag string) (*go_github.RepositoryRelease, error)
GetRelease returns a mock release.
func (*MockGitHubClient) GetReleases ¶
func (m *MockGitHubClient) GetReleases(owner, repo string, opts ReleaseOptions) ([]*go_github.RepositoryRelease, error)
GetReleases returns mock releases.
type RealGitHubClient ¶
type RealGitHubClient struct{}
RealGitHubClient implements GitHubClient using the real GitHub API.
func (*RealGitHubClient) GetLatestRelease ¶
func (c *RealGitHubClient) GetLatestRelease(owner, repo string) (*go_github.RepositoryRelease, error)
GetLatestRelease fetches the latest stable release.
func (*RealGitHubClient) GetRelease ¶
func (c *RealGitHubClient) GetRelease(owner, repo, tag string) (*go_github.RepositoryRelease, error)
GetRelease fetches a specific release by tag.
func (*RealGitHubClient) GetReleases ¶
func (c *RealGitHubClient) GetReleases(owner, repo string, opts ReleaseOptions) ([]*go_github.RepositoryRelease, error)
GetReleases fetches releases from GitHub.
type ReleaseOptions ¶
ReleaseOptions contains options for fetching releases.
type VersionCommandProvider ¶
type VersionCommandProvider struct{}
VersionCommandProvider implements the CommandProvider interface.
func (*VersionCommandProvider) GetAliases ¶ added in v1.199.0
func (v *VersionCommandProvider) GetAliases() []internal.CommandAlias
GetAliases returns command aliases. Version command has no aliases.
func (*VersionCommandProvider) GetCommand ¶
func (v *VersionCommandProvider) GetCommand() *cobra.Command
GetCommand returns the version command.
func (*VersionCommandProvider) GetCompatibilityFlags ¶ added in v1.198.0
func (v *VersionCommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag
GetCompatibilityFlags returns compatibility flags for this command. Version command has no compatibility flags (uses native Cobra flags only).
func (*VersionCommandProvider) GetFlagsBuilder ¶ added in v1.198.0
func (v *VersionCommandProvider) GetFlagsBuilder() flags.Builder
GetFlagsBuilder returns the flags builder for this command. Version command uses StandardParser for its flags.
func (*VersionCommandProvider) GetGroup ¶
func (v *VersionCommandProvider) GetGroup() string
GetGroup returns the command group for help organization.
func (*VersionCommandProvider) GetName ¶
func (v *VersionCommandProvider) GetName() string
GetName returns the command name.
func (*VersionCommandProvider) GetPositionalArgsBuilder ¶ added in v1.198.0
func (v *VersionCommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder
GetPositionalArgsBuilder returns the positional args builder for this command. Version command has no positional arguments.