Documentation ¶
Index ¶
- func ExecuteHttp(ctx context.Context, commonResty *resty.Client, p *HttpParams, ...) (err error)
- func MustNewRestyWith(portName aconfig.PortName, appConfig *aconfig.Application, protocol string) *resty.Client
- func NewResty(sugar *zap.SugaredLogger) *resty.Client
- func NewRestyWith(portName aconfig.PortName, appConfig *aconfig.Application, protocol string) (*resty.Client, error)
- type HttpParams
- type Logger
- type RespWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteHttp ¶ added in v0.0.20
func ExecuteHttp(ctx context.Context, commonResty *resty.Client, p *HttpParams, result interface{}) (err error)
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 ¶
Types ¶
type HttpParams ¶ added in v0.0.20
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(sugar *zap.SugaredLogger) *Logger
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
Click to show internal directories.
Click to hide internal directories.