client

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() *module.Module

Types

type Base

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

func (*Base) Request

func (r *Base) Request(ctx context.Context) *resty.Request

type DriverWrapper

type DriverWrapper wrapper.Wrapper[*resty.Client]

func WithTransport

func WithTransport(tr http.RoundTripper) DriverWrapper

type ErrDecoder

type ErrDecoder func(context.Context, *resty.Response) error

func DefaultErrDecoder

func DefaultErrDecoder(name string) ErrDecoder

type Factory

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

func NewFactory

func NewFactory(cfg *config.Config, wrappers []DriverWrapper) *Factory

func (*Factory) Get

func (f *Factory) Get(name string, opts ...Option) *Base

type GenericClientError added in v0.1.4

type GenericClientError struct {
	ClientName string
	StatusCode int
	RawBody    []byte
	ParsedBody interface{}
}

func (GenericClientError) Error added in v0.1.4

func (e GenericClientError) Error() string

type Option added in v0.1.4

type Option interface {
	Apply(*options)
}

func WithDriverWrappers added in v0.1.4

func WithDriverWrappers(wrappers ...DriverWrapper) Option

func WithErrDecoder added in v0.1.4

func WithErrDecoder(ed ErrDecoder) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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