23 lines
530 B
Go
23 lines
530 B
Go
package support
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
// AddressIngestResp 通用地址提取响应
|
|
type AddressIngestResp struct {
|
|
Recipient string `json:"recipient"` // 收货人
|
|
Phone string `json:"phone"` // 联系电话
|
|
Address string `json:"address"` // 收货地址
|
|
}
|
|
|
|
// AddressIngester 地址提取接口
|
|
type AddressIngester interface {
|
|
// Auth 鉴权逻辑
|
|
Auth(c *fiber.Ctx) error
|
|
// Ingest 执行提取逻辑
|
|
Ingest(ctx context.Context, text string) (*AddressIngestResp, error)
|
|
}
|