123456789101112131415161718192021222324252627282930 |
- package core
- import (
- "fmt"
- "net/http"
- "github.com/wechatpay-apiv3/wechatpay-go/core/auth"
- "github.com/wechatpay-apiv3/wechatpay-go/core/cipher"
- )
- type DialSettings struct {
- HTTPClient *http.Client
- Signer auth.Signer
- Validator auth.Validator
- Cipher cipher.Cipher
- }
- func (ds *DialSettings) Validate() error {
- if ds.Validator == nil {
- return fmt.Errorf("validator is required for Client")
- }
- if ds.Signer == nil {
- return fmt.Errorf("signer is required for Client")
- }
- return nil
- }
|