实名认证对接--ok

This commit is contained in:
yml2213
2026-05-29 14:00:52 +08:00
parent f89e694fd0
commit f386fcc552
11 changed files with 465 additions and 6 deletions
@@ -10,6 +10,7 @@ import (
)
type Provider interface {
Name() string
Start(ctx context.Context, req StartRequest) (ProviderResult, error)
}
@@ -34,6 +35,10 @@ func NewMockProvider() *MockProvider {
return &MockProvider{}
}
func (p *MockProvider) Name() string {
return "mock"
}
func (p *MockProvider) Start(_ context.Context, req StartRequest) (ProviderResult, error) {
if strings.TrimSpace(req.Name) == "" || strings.TrimSpace(req.IDNo) == "" {
return ProviderResult{}, errors.New("name and id no are required")