httpclient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewRestyWith

func MustNewRestyWith(portName aconfig.PortName, appConfig *aconfig.Application, protocol string) *resty.Client

func NewResty

func NewResty(sugar *zap.SugaredLogger) *resty.Client

func NewRestyWith

func NewRestyWith(portName aconfig.PortName, appConfig *aconfig.Application, protocol string) (*resty.Client, error)

Types

type Logger

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

func NewLogger

func NewLogger(sugar *zap.SugaredLogger) *Logger

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...interface{})

type RespWrapper

type RespWrapper struct {
	Response  *resty.Response
	FuncError error
	// contains filtered or unexported fields
}

func Wrapper

func Wrapper(r *resty.Response, funcError error) *RespWrapper

func (*RespWrapper) Error

func (rp *RespWrapper) Error() interface{}

func (*RespWrapper) Parse

func (rp *RespWrapper) Parse() (err error)

func (*RespWrapper) Result

func (rp *RespWrapper) Result() interface{}

func (*RespWrapper) WithError

func (rp *RespWrapper) WithError(err interface{}) *RespWrapper

func (*RespWrapper) WithResult

func (rp *RespWrapper) WithResult(result interface{}) *RespWrapper

Jump to

Keyboard shortcuts

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