Documentation
¶
Index ¶
- Constants
- type GitHubClientInterface
- type Manager
- func (self *Manager) AvailableUpdates(ctx context.Context, currentVersion string) ([]string, error)
- func (self *Manager) GetLatestVersion(ctx context.Context) (string, error)
- func (m *Manager) GetNextAvailableVersion(ctx context.Context, currentVersion string) (string, error)
- func (self *Manager) GetRepositoryInfo() (string, string)
- func (self *Manager) GetUpdatePath(ctx context.Context, currentVersion, targetVersion string) ([]string, error)
- func (m *Manager) GetVersionMetadata(ctx context.Context) (VersionMetadataMap, error)
- type RepositoriesServiceInterface
- type VersionMetadata
- type VersionMetadataMap
Constants ¶
const ( // DefaultOwner is the GitHub organization name for Unbind DefaultOwner = "unbindapp" // DefaultRepo is the GitHub repository name for Unbind releases DefaultRepo = "unbind-releases" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubClientInterface ¶
type GitHubClientInterface interface {
Repositories() RepositoriesServiceInterface
}
GitHubClientInterface defines the interface for GitHub client operations we need
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles release management functionality
func NewManager ¶
func NewManager(client GitHubClientInterface, releaseRepoOverride string) *Manager
NewManager creates a new release manager
func (*Manager) AvailableUpdates ¶
AvailableUpdates returns a list of available updates from the current version The list is ordered from the next version to the latest version
func (*Manager) GetLatestVersion ¶
GetLatestVersion returns the latest available version
func (*Manager) GetNextAvailableVersion ¶
func (m *Manager) GetNextAvailableVersion(ctx context.Context, currentVersion string) (string, error)
GetNextAvailableVersion returns the next version that can be updated to from the current version
func (*Manager) GetRepositoryInfo ¶
GetRepositoryInfo returns the repository owner and name
func (*Manager) GetUpdatePath ¶
func (self *Manager) GetUpdatePath(ctx context.Context, currentVersion, targetVersion string) ([]string, error)
GetUpdatePath returns an ordered list of versions needed to update from current to target version
func (*Manager) GetVersionMetadata ¶
func (m *Manager) GetVersionMetadata(ctx context.Context) (VersionMetadataMap, error)
GetVersionMetadata fetches the metadata for all versions
type RepositoriesServiceInterface ¶
type RepositoriesServiceInterface interface { ListTags(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryTag, *github.Response, error) ListReleases(ctx context.Context, owner, repo string, opts *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error) }
RepositoriesServiceInterface defines the interface for GitHub repositories service
type VersionMetadata ¶
type VersionMetadata struct { Version string `json:"version"` DependsOn []string `json:"depends_on,omitempty"` // Versions that must be installed before this one RequiredBy []string `json:"required_by,omitempty"` // Versions that require this version Breaking bool `json:"breaking,omitempty"` // Whether this version contains breaking changes Description string `json:"description,omitempty"` // Description of the version ReleaseNotes string `json:"release_notes,omitempty"` // URL to release notes }
VersionMetadata represents the metadata for a specific version
type VersionMetadataMap ¶
type VersionMetadataMap map[string]VersionMetadata
VersionMetadataMap maps version strings to their metadata