start pulling in the github api client wrapper
Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
parent
97c10f4c04
commit
5462df5e7b
3 changed files with 52 additions and 3 deletions
19
pkg/cmd/attestation/github/client.go
Normal file
19
pkg/cmd/attestation/github/client.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue