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
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) GetCommand ¶
func (v *VersionCommandProvider) GetCommand() *cobra.Command
GetCommand returns the version command.
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.