Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, request *v2.CreateConnectorRequest, ...) (*v2.CreateConnectorResponse, error)
- func (c *Client) Delete(ctx context.Context, id string, opts ...option.RequestOption) (v2.DeleteConnectorResponse, error)
- func (c *Client) Get(ctx context.Context, id string, opts ...option.RequestOption) (*v2.GetConnectorResponse, error)
- func (c *Client) List(ctx context.Context, request *v2.ConnectorsListRequest, ...) (*v2.ListConnectorsResponse, error)
- func (c *Client) OAuthAuthorize(ctx context.Context, id string, request *v2.ConnectorsOAuthAuthorizeRequest, ...) (*v2.OAuthAuthorizeResponse, error)
- func (c *Client) Update(ctx context.Context, id string, request *v2.UpdateConnectorRequest, ...) (*v2.UpdateConnectorResponse, error)
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
}
func NewClient ¶
func NewClient(opts ...option.RequestOption) *Client
func (*Client) Create ¶
func (c *Client) Create( ctx context.Context, request *v2.CreateConnectorRequest, opts ...option.RequestOption, ) (*v2.CreateConnectorResponse, error)
Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information.
func (*Client) Delete ¶
func (c *Client) Delete( ctx context.Context, id string, opts ...option.RequestOption, ) (v2.DeleteConnectorResponse, error)
Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information.
func (*Client) Get ¶
func (c *Client) Get( ctx context.Context, id string, opts ...option.RequestOption, ) (*v2.GetConnectorResponse, error)
Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information.
func (*Client) List ¶
func (c *Client) List( ctx context.Context, request *v2.ConnectorsListRequest, opts ...option.RequestOption, ) (*v2.ListConnectorsResponse, error)
Returns a list of connectors ordered by descending creation date (newer first). See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information.
func (*Client) OAuthAuthorize ¶
func (c *Client) OAuthAuthorize( ctx context.Context, id string, request *v2.ConnectorsOAuthAuthorizeRequest, opts ...option.RequestOption, ) (*v2.OAuthAuthorizeResponse, error)
Authorize the connector with the given ID for the connector oauth app. See ['Connector Authentication'](https://docs.cohere.com/docs/connector-authentication) for more information.
func (*Client) Update ¶
func (c *Client) Update( ctx context.Context, id string, request *v2.UpdateConnectorRequest, opts ...option.RequestOption, ) (*v2.UpdateConnectorResponse, error)
Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information.