pipeliner

package
v0.0.0-...-becd8fe Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 NewConnector(opts ...Option) (conn *Connector, outErr error)

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 (c *Connector) ListObjectMetadata(
	ctx context.Context, objectNames []string,
) (*common.ListObjectMetadataResult, error)

func (*Connector) Provider

func (c *Connector) Provider() providers.Provider

func (*Connector) Read

func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)

func (*Connector) String

func (c *Connector) String() string

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 WithClient(ctx context.Context, client *http.Client,
	user, pass string, opts ...common.HeaderAuthClientOption,
) Option

func WithWorkspace

func WithWorkspace(workspaceRef string) Option

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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