go:generate moq -rm -out client_mock.go . CapiClient CapiClient defines the methods used by the caller. Implementations may be replaced with test doubles in unit tests.
| 11 | // CapiClient defines the methods used by the caller. Implementations |
| 12 | // may be replaced with test doubles in unit tests. |
| 13 | type CapiClient interface { |
| 14 | ListLatestSessionsForViewer(ctx context.Context, limit int) ([]*Session, error) |
| 15 | CreateJob(ctx context.Context, owner, repo, problemStatement, baseBranch string, customAgent string) (*Job, error) |
| 16 | GetJob(ctx context.Context, owner, repo, jobID string) (*Job, error) |
| 17 | GetSession(ctx context.Context, id string) (*Session, error) |
| 18 | GetSessionLogs(ctx context.Context, id string) ([]byte, error) |
| 19 | ListSessionsByResourceID(ctx context.Context, resourceType string, resourceID int64, limit int) ([]*Session, error) |
| 20 | GetPullRequestDatabaseID(ctx context.Context, hostname string, owner string, repo string, number int) (int64, string, error) |
| 21 | } |
| 22 | |
| 23 | // CAPIClient is a client for interacting with the Copilot API |
| 24 | type CAPIClient struct { |
no outgoing calls
no test coverage detected