start pulling in the github api client wrapper

Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
Meredith Lancaster 2024-03-01 16:31:23 -07:00
parent 97c10f4c04
commit 5462df5e7b
3 changed files with 52 additions and 3 deletions

View file

@ -0,0 +1,19 @@
package github
import "github.com/cli/cli/v2/api"
type Client interface {
GetByRepoAndDigest(repo, digest string, limit int) ([]*Attestation, error)
GetByOwnerAndDigest(owner, digest string, limit int) ([]*Attestation, error)
}
type LiveClient struct {
apiClient api.Client
}
func NewLiveClient() (*LiveClient, error) {
apiClient := api.NewClientFromHTTP(httpClient)
return &LiveClient{
apiClient: apiClient,
}, nil
}