Documentation
¶
Index ¶
- type Body
- type HttpThird
- func (a *HttpThird) Delete(api string, params map[string]interface{}) (*Response, error)
- func (a *HttpThird) Get(api string, params map[string]interface{}) (*Response, error)
- func (a *HttpThird) Head(api string, params map[string]interface{}) (*Response, error)
- func (a *HttpThird) Post(api string, params map[string]interface{}) (*Response, error)
- func (a *HttpThird) Put(api string, params map[string]interface{}) (*Response, error)
- func (a *HttpThird) SetBaseAuth(username, password string)
- func (a *HttpThird) SetHeader(headers map[string]string)
- func (a *HttpThird) SetLogInfoFlag(on bool)
- func (a *HttpThird) SetTLSClientConfig(cfg *tls.Config)
- type PostFile
- type Response
- type RpcThird
- func (a *RpcThird) GetConn() (*grpc.ClientConn, error)
- func (a *RpcThird) GetCtx() (context.Context, context.CancelFunc)
- func (a *RpcThird) SetAfterUnaryClientInterceptor(unary UnaryClientInterceptor)
- func (a *RpcThird) SetBeforeStreamClientInterceptor(stream StreamClientInterceptor)
- func (a *RpcThird) SetBeforeUnaryClientInterceptor(unary UnaryClientInterceptor)
- func (a *RpcThird) SetLogInfoFlag(on bool)
- type StreamClientInterceptor
- type UnaryClientInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpThird ¶
type HttpThird struct {
Domain string
Hostname string
ConnectTimeout int
ReadWriteTimeout int
// contains filtered or unexported fields
}
封装 http 接口的基础类
func (*HttpThird) SetBaseAuth ¶
func (*HttpThird) SetTLSClientConfig ¶ added in v1.2.2
type RpcThird ¶
type RpcThird struct {
sync.Mutex
Address string
Timeout int
MaxRecvMsgsizeMb int
MaxSendMsgsizeMb int
SslOn bool
CertFile string
Hostname string
// contains filtered or unexported fields
}
封装 rpc 的基础类
func (*RpcThird) SetAfterUnaryClientInterceptor ¶ added in v1.2.7
func (a *RpcThird) SetAfterUnaryClientInterceptor(unary UnaryClientInterceptor)
func (*RpcThird) SetBeforeStreamClientInterceptor ¶ added in v1.2.7
func (a *RpcThird) SetBeforeStreamClientInterceptor(stream StreamClientInterceptor)
func (*RpcThird) SetBeforeUnaryClientInterceptor ¶ added in v1.2.7
func (a *RpcThird) SetBeforeUnaryClientInterceptor(unary UnaryClientInterceptor)
func (*RpcThird) SetLogInfoFlag ¶ added in v1.2.5
设置是否要关闭 info 日志
type StreamClientInterceptor ¶ added in v1.2.7
type StreamClientInterceptor func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, opts ...grpc.CallOption) error
type UnaryClientInterceptor ¶ added in v1.2.7
type UnaryClientInterceptor func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, opts ...grpc.CallOption) error
Click to show internal directories.
Click to hide internal directories.