Documentation ¶
Overview ¶
Package config is a config for union-go
Index ¶
Constants ¶
View Source
const ( // Version golang sdk version Version = "0.0.1" // UserAgent name of jd user agent UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" // Timeout request timeout Timeout = 5 * time.Second )
View Source
const ( RequestFormat = "json" RequestVersion = "1.0" RequestTimestamp = "Y-m-d H:i:s" RequestSignMethod = "md5" )
View Source
const ( // UnionOpenCategoryGoodsGet jd.union.open.category.goods.get // 商品类目查询接口 // see https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.category.goods.get UnionOpenCategoryGoodsGet = "jd.union.open.category.goods.get" // DefaultParentID 父类目id 一级类目id为0 // see https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.category.goods.get DefaultParentID uint = 0 // GradeZero 类目级别(类目级别 0,1,2 代表一、二、三级类目) // see https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.category.goods.get GradeZero uint = 0 // GradeOne 类目级别(类目级别 0,1,2 代表一、二、三级类目) // see https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.category.goods.get GradeOne uint = 1 // GradeTwo 类目级别(类目级别 0,1,2 代表一、二、三级类目) // see https://union.jd.com/openplatform/api/v2?apiName=jd.union.open.category.goods.get GradeTwo uint = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config this is config for JD
type Option ¶
type Option func(o *options)
Option The option is a polaris option.
func WithAccessToken ¶
WithAccessToken set access token at runtime
func WithUserAgent ¶
Click to show internal directories.
Click to hide internal directories.