Documentation ¶
Index ¶
- Constants
- type Connector
- func (c *Connector) Delete(ctx context.Context, config common.DeleteParams) (*common.DeleteResult, error)
- func (c *Connector) HTTPClient() *common.HTTPClient
- func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
- func (c *Connector) ListObjectMetadata(ctx context.Context, objectNames []string) (*common.ListObjectMetadataResult, error)
- func (c *Connector) Provider() providers.Provider
- func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
- func (c *Connector) String() string
- func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
- type Option
- type ResponseSimpleError
- type ResponseWithCodeError
Constants ¶
View Source
const (
// DefaultPageSize is number of elements per page.
DefaultPageSize = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { BaseURL string Workspace string Module common.Module Client *common.JSONHTTPClient }
func NewConnector ¶
func (*Connector) Delete ¶
func (c *Connector) Delete(ctx context.Context, config common.DeleteParams) (*common.DeleteResult, error)
func (*Connector) HTTPClient ¶
func (c *Connector) HTTPClient() *common.HTTPClient
func (*Connector) JSONHTTPClient ¶
func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
JSONHTTPClient returns the underlying JSON HTTP client.
func (*Connector) ListObjectMetadata ¶
func (*Connector) Read ¶
func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
func (*Connector) Write ¶
func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
type Option ¶
type Option = func(params *parameters)
Option is a function which mutates the connector configuration.
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
func WithClient ¶
func WithWorkspace ¶
type ResponseSimpleError ¶
type ResponseSimpleError struct { Status int `json:"status"` Message string `json:"message"` ErrorCode any `json:"errorcode"` Traceback any `json:"traceback"` }
ResponseSimpleError occurs for Read method, invalid URL.
func (ResponseSimpleError) CombineErr ¶
func (r ResponseSimpleError) CombineErr(base error) error
type ResponseWithCodeError ¶
type ResponseWithCodeError struct { Code int `json:"code"` Name string `json:"name"` Message string `json:"message"` EntityId string `json:"entity_id"` EntityName string `json:"entity_name"` EntityErrors []struct { Code int `json:"code"` Name string `json:"name"` Message string `json:"message"` } `json:"entity_errors"` FieldErrors []struct { FieldId string `json:"field_id"` FieldName string `json:"field_name"` Name string `json:"name"` Code int `json:"code"` Errors []struct { Code int `json:"code"` Name string `json:"name"` Message string `json:"message"` FieldId string `json:"field_id"` FieldName string `json:"field_name"` } `json:"errors"` } `json:"field_errors"` StepChecklistErrors []interface{} `json:"step_checklist_errors"` EntityIndex interface{} `json:"entity_index"` HTTPStatus int `json:"http_status"` Success bool `json:"success"` }
ResponseWithCodeError extended error format, happens during invalid Create/Update. nolint:tagliatelle
func (ResponseWithCodeError) CombineErr ¶
func (r ResponseWithCodeError) CombineErr(base error) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.