Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Capabilities() registry.SourceCaps
- func (c *Client) Close() error
- func (c *Client) Download(ctx context.Context, slug string, opts registry.DownloadOpts) (*registry.DownloadResult, error)
- func (c *Client) DownloadRevision(ctx context.Context, slug, commit string, maxBytes int64) (*registry.DownloadResult, error)
- func (c *Client) Info(ctx context.Context, slug string) (*registry.Detail, error)
- func (c *Client) Name() string
- func (c *Client) ReadFile(ctx context.Context, slug, commit, path string, maxBytes int64) ([]byte, error)
- func (c *Client) ResolveCommit(ctx context.Context, slug, ref string) (string, error)
- func (c *Client) Search(ctx context.Context, query string, opts registry.SearchOpts) ([]registry.Listing, error)
- func (c *Client) UploadRelease(ctx context.Context, request ReleaseUploadRequest) (ReleaseUploadResult, error)
- type Option
- type ReleaseUploadRequest
- type ReleaseUploadResult
- type ReleaseUploader
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
var ( ErrContentTooLarge = errors.New("github: repository content exceeds size limit") ErrRateLimited = errors.New("github: rate limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the GitHub Releases registry source.
func (*Client) Capabilities ¶
func (c *Client) Capabilities() registry.SourceCaps
Capabilities reports which registry operations GitHub supports.
func (*Client) Download ¶
func (c *Client) Download( ctx context.Context, slug string, opts registry.DownloadOpts, ) (*registry.DownloadResult, error)
Download fetches the selected release archive stream.
func (*Client) DownloadRevision ¶
func (c *Client) DownloadRevision( ctx context.Context, slug, commit string, maxBytes int64, ) (*registry.DownloadResult, error)
DownloadRevision returns an owned archive of a pinned commit, independent of release tags.
func (*Client) Info ¶
Info fetches metadata from the latest published release and page one of the releases listing.
func (*Client) ReadFile ¶
func (c *Client) ReadFile(ctx context.Context, slug, commit, path string, maxBytes int64) ([]byte, error)
ReadFile reads bounded raw contents from a pinned repository revision.
func (*Client) ResolveCommit ¶
ResolveCommit pins a branch, tag, or HEAD to the repository's full commit identity.
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, query string, opts registry.SearchOpts) ([]registry.Listing, error)
Search discovers repositories carrying the Compozy extension topic.
func (*Client) UploadRelease ¶
func (c *Client) UploadRelease( ctx context.Context, request ReleaseUploadRequest, ) (ReleaseUploadResult, error)
UploadRelease creates or updates a GitHub release and uploads its archive plus digest sidecar. Authentication is carried only by the client.
type Option ¶
type Option func(*Client)
Option customizes a GitHub client.
func WithHTTPClient ¶
WithHTTPClient provides the base HTTP client wrapped by the outbound network policy.
func WithLogger ¶
WithLogger overrides the logger used for rate-limit warnings.
func WithRetryPolicy ¶
WithRetryPolicy overrides the retry policy used for retryable responses.
type ReleaseUploadRequest ¶
type ReleaseUploadRequest struct {
Repository string
TagName string
Draft bool
AssetName string
Archive []byte
DigestSidecar []byte
}
ReleaseUploadRequest contains publishable release data. Credentials remain bound to the uploader and never enter this request.
type ReleaseUploadResult ¶
ReleaseUploadResult reports the published release and archive locations.
type ReleaseUploader ¶
type ReleaseUploader interface {
UploadRelease(context.Context, ReleaseUploadRequest) (ReleaseUploadResult, error)
}
ReleaseUploader uploads a release archive and its SHA-256 sidecar.
type ResponseError ¶
type ResponseError struct {
StatusCode int
// contains filtered or unexported fields
}
ResponseError retains the status independently of the untrusted upstream message.
func (*ResponseError) Error ¶
func (e *ResponseError) Error() string
Error preserves the existing GitHub diagnostic message; public source errors expose only StatusCode.