You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-library/service/baidu/client.go

34 lines
575 B

2 years ago
package baidu
import (
"github.com/dtapps/go-library/utils/golog"
"github.com/dtapps/go-library/utils/gorequest"
)
// ClientConfig 实例配置
type ClientConfig struct {
Ak string
2 years ago
}
type Client struct {
requestClient *gorequest.App // 请求服务
config struct {
ak string
}
9 months ago
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
1 year ago
}
2 years ago
}
// NewClient 创建实例化
func NewClient(config *ClientConfig) (*Client, error) {
2 years ago
c := &Client{}
2 years ago
c.config.ak = config.Ak
2 years ago
c.requestClient = gorequest.NewHttp()
2 years ago
return c, nil
}