Documentation ¶
Overview ¶
estuary allows Git Annex remotes to work with the Estuary service
Index ¶
- Constants
- type Client
- func (cl *Client) Equal(other *Client) bool
- func (cl *Client) IsPresent(ctx context.Context, c cid.Cid) (bool, error)
- func (cl *Client) Pin(ctx context.Context, c cid.Cid, key string) error
- func (cl *Client) Unpin(ctx context.Context, c cid.Cid) error
- func (cl *Client) Upload(ctx context.Context, fi fs.File, pro *progress.Tracker) (cid.Cid, error)
- type NewOpt
Constants ¶
const DefaultEndpoint = "https://api.estuary.tech/"
DefaultEndpoint is the default base URL for the Estuary API.
const DefaultPSAEndpoint = DefaultEndpoint + "pinning"
DefaultPSAEndpoint is the default base URL for the Estuary Pinning Service API.
const DefaultUploadEndpoint = "https://upload.estuary.tech/"
DefaultUploadEndpoint is the default base URL for the Estuary upload endpoint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for the Estuary API for use by Git Annex remotes.
type NewOpt ¶
type NewOpt func(options *config) error
NewOpt is an option for the New() function.
func WithEndpoint ¶
WithEndpoint is an option for the New() function which sets the HTTP endpoint for the Estuary API; by default DefaultEndpoint is used
func WithHTTPClient ¶
WithHTTPClient is an option for the New() function which sets the http.Client with which to access the endpoint. By default, a new retryablehttp.Client is used.
func WithPSAEndpoint ¶
WithPSAEndpoint is an option for the New() function which sets the HTTP endpoint for the Estuary PSA API; by default DefaultPSAEndpoint is used
func WithToken ¶
WithToken is an option for the New() function which sets the JSON Web Token to authenticate with the endpoint.
func WithUploadEndpoint ¶
WithUploadEndpoint is an option for the New() function which sets the HTTP endpoint for the Estuary upload API; by default DefaultUploadEndpoint is used