ingesthttpclient

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2021 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an http client for the indexer ingest API

func New

func New(baseURL string, options ...httpclient.Option) (*Client, error)

New creates a new ingest http Client

func (*Client) GetProvider

func (c *Client) GetProvider(ctx context.Context, providerID peer.ID) (*model.ProviderInfo, error)

func (*Client) IndexContent

func (c *Client) IndexContent(ctx context.Context, providerID peer.ID, privateKey p2pcrypto.PrivKey, m multihash.Multihash, contextID []byte, metadata v0.Metadata, addrs []string) error

func (*Client) ListProviders

func (c *Client) ListProviders(ctx context.Context) ([]*model.ProviderInfo, error)

func (*Client) Register

func (c *Client) Register(ctx context.Context, providerID peer.ID, privateKey p2pcrypto.PrivKey, addrs []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL