1package lfs
 2
 3import (
 4	"context"
 5	"io"
 6)
 7
 8// DownloadCallback gets called for every requested LFS object to process its content
 9type DownloadCallback func(p Pointer, content io.ReadCloser, objectError error) error
10
11// UploadCallback gets called for every requested LFS object to provide its content
12type UploadCallback func(p Pointer, objectError error) (io.ReadCloser, error)
13
14// Client is a Git LFS client to communicate with a LFS source API.
15type Client interface {
16	Download(ctx context.Context, objects []Pointer, callback DownloadCallback) error
17	Upload(ctx context.Context, objects []Pointer, callback UploadCallback) error
18}
19
20// NewClient returns a new Git LFS client.
21func NewClient(e Endpoint) Client {
22	if e.Scheme == "http" || e.Scheme == "https" {
23		return newHTTPClient(e)
24	}
25	// TODO: support ssh client
26	return nil
27}