conn

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAsyncErrorNotFound

func IsAsyncErrorNotFound(err error) bool

func IsAsyncJobInProgress

func IsAsyncJobInProgress(err error) (string, bool)

func NewAsyncConnection

func NewAsyncConnection(c driver.Connection) driver.Connection

func NewClosedConnection

func NewClosedConnection() driver.Connection

func WithAsyncID

func WithAsyncID(ctx context.Context, id string) context.Context

Types

type Auth

type Auth func() (driver.Authentication, error)

type Config

type Config func() (http.ConnectionConfig, error)

type Connection

type Connection interface {
	Execute(ctx context.Context, method string, endpoint string, body io.Reader) (io.ReadCloser, int, error)
}

type ConnectionWrap

type ConnectionWrap func(c driver.Connection) driver.Connection

type ContextKey

type ContextKey string

type Executor

type Executor[IN, OUT interface{}] interface {
	ExecuteGet(ctx context.Context, endpoint string) (*OUT, int, error)
	Execute(ctx context.Context, method string, endpoint string, in IN) (*OUT, int, error)
}

func NewExecutor

func NewExecutor[IN, OUT interface{}](conn Connection) Executor[IN, OUT]

type Factory

type Factory interface {
	Connection(hosts ...string) (driver.Connection, error)
	AgencyConnection(hosts ...string) (driver.Connection, error)

	Client(hosts ...string) (driver.Client, error)
	Agency(hosts ...string) (agency.Agency, error)

	RawConnection(host string) (Connection, error)

	GetAuth() Auth
}

func NewFactory

func NewFactory(auth Auth, config Config) Factory

Jump to

Keyboard shortcuts

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