Documentation
¶
Index ¶
- func LogError(logger logger.Logger, err error, operation string, ...)
- type APIError
- type Authenticator
- type GitHubAuthenticator
- type RateLimitError
- type WorkflowRunsConfig
- type WorkflowRunsOptions
- type WorkflowStatsClient
- func (c *WorkflowStatsClient) FetchWorkflowJobsAttempts(ctx context.Context, runs []*github.WorkflowRun, cfg *WorkflowRunsConfig) ([]*github.WorkflowJob, error)
- func (c *WorkflowStatsClient) FetchWorkflowRuns(ctx context.Context, cfg *WorkflowRunsConfig, opt *WorkflowRunsOptions) ([]*github.WorkflowRun, error)
- func (c *WorkflowStatsClient) WithLogger(log logger.Logger) *WorkflowStatsClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶ added in v0.4.0
type APIError struct {
*errors.AppError
StatusCode int
RequestID string
Resource string
Operation string
}
APIError represents a structured GitHub API error
func NewAPIError ¶ added in v0.4.0
func (*APIError) WithOperation ¶ added in v0.4.0
func (*APIError) WithRequestID ¶ added in v0.4.0
func (*APIError) WithResource ¶ added in v0.4.0
type Authenticator ¶
type GitHubAuthenticator ¶
type GitHubAuthenticator struct{}
func (*GitHubAuthenticator) AuthTokenForHost ¶
func (ga *GitHubAuthenticator) AuthTokenForHost(host string) (string, error)
type RateLimitError ¶ added in v0.2.0
type RateLimitError struct {
Err error
Limit int
Remaining int
ResetAt time.Time
RetryAfter time.Duration
Resource string
Operation string
}
Enhanced RateLimitError with more context
func NewRateLimitError ¶ added in v0.4.0
func NewRateLimitError(gitHubErr *github.RateLimitError, resource, operation string) *RateLimitError
NewRateLimitError creates a RateLimitError from github.RateLimitError
func (RateLimitError) Error ¶ added in v0.2.0
func (e RateLimitError) Error() string
func (RateLimitError) Unwrap ¶ added in v0.4.0
func (e RateLimitError) Unwrap() error
type WorkflowRunsConfig ¶
Legacy types for backward compatibility - use types package instead
func FromWorkflowConfig ¶ added in v0.4.0
func FromWorkflowConfig(config *types.WorkflowConfig) *WorkflowRunsConfig
FromWorkflowConfig creates legacy WorkflowRunsConfig from types.WorkflowConfig
func (*WorkflowRunsConfig) ToWorkflowConfig ¶ added in v0.4.0
func (c *WorkflowRunsConfig) ToWorkflowConfig() *types.WorkflowConfig
ToWorkflowConfig converts legacy WorkflowRunsConfig to types.WorkflowConfig
type WorkflowRunsOptions ¶
type WorkflowRunsOptions struct {
Actor string
Branch string
Event string
Status string
Created string
HeadSHA string
ExcludePullRequests bool
CheckSuiteID int64
All bool
}
func FromAPIRequestOptions ¶ added in v0.4.0
func FromAPIRequestOptions(options *types.APIRequestOptions) *WorkflowRunsOptions
FromAPIRequestOptions creates legacy WorkflowRunsOptions from types.APIRequestOptions
func (*WorkflowRunsOptions) ToAPIRequestOptions ¶ added in v0.4.0
func (o *WorkflowRunsOptions) ToAPIRequestOptions() *types.APIRequestOptions
ToAPIRequestOptions converts legacy WorkflowRunsOptions to types.APIRequestOptions
type WorkflowStatsClient ¶
type WorkflowStatsClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(host string, authenticator Authenticator, log logger.Logger) (*WorkflowStatsClient, error)
func (*WorkflowStatsClient) FetchWorkflowJobsAttempts ¶
func (c *WorkflowStatsClient) FetchWorkflowJobsAttempts(ctx context.Context, runs []*github.WorkflowRun, cfg *WorkflowRunsConfig) ([]*github.WorkflowJob, error)
func (*WorkflowStatsClient) FetchWorkflowRuns ¶
func (c *WorkflowStatsClient) FetchWorkflowRuns(ctx context.Context, cfg *WorkflowRunsConfig, opt *WorkflowRunsOptions) ([]*github.WorkflowRun, error)
func (*WorkflowStatsClient) WithLogger ¶ added in v0.4.0
func (c *WorkflowStatsClient) WithLogger(log logger.Logger) *WorkflowStatsClient
WithLogger returns a new client with the specified logger
Click to show internal directories.
Click to hide internal directories.