Files
2026-07-21 15:53:29 +08:00

41 lines
1.2 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package fadada
import "sync"
// API 路径常量FASC OpenAPI v5.1
const (
pathGetAccessToken = "/service/get-access-token"
pathGetCorpAuthURL = "/corp/get-auth-url"
pathGetCorpIdentifiedStatus = "/corp/get-identified-status"
pathFillDocTemplateValues = "/doc-template/fill-values"
pathCreateSignTaskTemplate = "/sign-task/create-with-template"
pathFillSignTaskFieldValues = "/sign-task/field/fill-values"
pathStartSignTask = "/sign-task/start"
pathGetSignTaskActorURL = "/sign-task/actor/get-url"
pathGetSignTaskDetail = "/sign-task/app/get-detail"
pathGetSignTaskPreviewURL = "/sign-task/get-preview-url"
pathGetOwnerSignTaskDownload = "/sign-task/owner/get-download-url"
)
// Client 法大大客户端(纯 HTTP不依赖官方 SDK
type Client struct {
config *Config
http *HTTPClient
tokenCache *tokenCache
tokenMu sync.Mutex
}
// NewClient 创建法大大客户端
func NewClient(config *Config) *Client {
return &Client{
config: config,
http: NewHTTPClient(config),
tokenCache: &tokenCache{},
}
}
// GetConfig 获取当前配置
func (c *Client) GetConfig() *Config {
return c.config
}