Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// GetLatestSHATag returns the most recent sha-* tag for a given container image.
//
// Returns empty string if no sha tags are found or if the query fails.
GetLatestSHATag(ctx context.Context, owner, repo, appName string) (string, error)
}
Client provides methods for interacting with the GitHub API.
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
DefaultClient implements the Client interface using the official go-github library.
func (*DefaultClient) GetLatestSHATag ¶
func (c *DefaultClient) GetLatestSHATag(ctx context.Context, owner, repo, appName string) (string, error)
GetLatestSHATag queries GHCR for the most recent sha-* tag for a given image. The image name format is: {repo}-{appName} For example: "my-website-web" for repo "my-website" and app "web".
Returns empty string if:
- No package versions are found
- No sha-* tags exist
- API request fails
Click to show internal directories.
Click to hide internal directories.