Documentation ¶
Overview ¶
Package config Configuration information of the DouYin Open Platform
Index ¶
- Constants
- type Config
- func (cfg *Config) Cache() cache.Cache
- func (cfg *Config) CacheKeyPrefix() string
- func (cfg *Config) ClientKey() string
- func (cfg *Config) ClientSecret() string
- func (cfg *Config) KeyType() Secret
- func (cfg *Config) KeyVersion() int
- func (cfg *Config) Logger() logger.ILogger
- func (cfg *Config) PrivateKey() string
- func (cfg *Config) PublicKey() string
- func (cfg *Config) RedirectURL() string
- func (cfg *Config) Request() request.Request
- func (cfg *Config) Salt() string
- func (cfg *Config) Scopes() string
- func (cfg *Config) SetCache(cache cache.Cache) *Config
- func (cfg *Config) SetCacheKeyPrefix(cacheKeyPrefix string) *Config
- func (cfg *Config) SetClientKey(clientKey string) *Config
- func (cfg *Config) SetClientSecret(clientSecret string) *Config
- func (cfg *Config) SetKeyType(keyType Secret) *Config
- func (cfg *Config) SetKeyVersion(keyVersion int) *Config
- func (cfg *Config) SetLogger(logger logger.ILogger) *Config
- func (cfg *Config) SetPrivateKey(privateKey string) *Config
- func (cfg *Config) SetPublicKey(publicKey string) *Config
- func (cfg *Config) SetRedirectURL(redirectURL string) *Config
- func (cfg *Config) SetRequest(request request.Request) *Config
- func (cfg *Config) SetSalt(salt string) *Config
- func (cfg *Config) SetScopes(scopes string) *Config
- func (cfg *Config) SetToken(token string) *Config
- func (cfg *Config) SetVersion(version string) *Config
- func (cfg *Config) Token() string
- func (cfg *Config) Version() string
- type Option
- func WithCache(cache cache.Cache) Option
- func WithCacheKeyPrefix(cacheKeyPrefix string) Option
- func WithClientKey(clientKey string) Option
- func WithClientSecret(clientSecret string) Option
- func WithKeyType(keyType Secret) Option
- func WithKeyVersion(keyVersion int) Option
- func WithLogger(logger logger.ILogger) Option
- func WithPrivateKey(privateKey string) Option
- func WithPublicKey(publicKey string) Option
- func WithRedirectURL(redirectURL string) Option
- func WithRequest(request request.Request) Option
- func WithSalt(salt string) Option
- func WithScopes(scopes string) Option
- func WithToken(token string) Option
- type Secret
Constants ¶
const (
// AccessTokenKey AccessToken Key
AccessTokenKey = "accessTokenKey"
)
const (
// CacheKeyPrefix 抖音 open cache key 前缀
CacheKeyPrefix = "bytedance_douyin_lite"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config 抖音开放平台的配置信息
func NewConfig ¶
func NewConfig(ctx context.Context, clientKey, clientSecret, redirectURL, scopes, salt, token string) *Config
NewConfig new config
func (*Config) CacheKeyPrefix ¶ added in v0.0.7
CacheKeyPrefix 获取 cacheKeyPrefix
func (*Config) KeyVersion ¶ added in v0.0.9
KeyVersion 获取 keyVersion
func (*Config) PrivateKey ¶ added in v0.0.9
PrivateKey 获取 privateKey
func (*Config) SetCacheKeyPrefix ¶ added in v0.0.7
SetCacheKeyPrefix 设置 cacheKeyPrefix
func (*Config) SetClientKey ¶
SetClientKey 设置 clientKey
func (*Config) SetClientSecret ¶
SetClientSecret 设置 clientSecret
func (*Config) SetKeyType ¶ added in v0.1.0
SetKeyType 设置 keyType
func (*Config) SetKeyVersion ¶ added in v0.0.9
SetKeyVersion 设置 keyVersion
func (*Config) SetPrivateKey ¶ added in v0.0.9
SetPrivateKey 设置 privateKey
func (*Config) SetPublicKey ¶ added in v0.0.9
SetPublicKey 设置 publicKey
func (*Config) SetRedirectURL ¶
SetRedirectURL 设置 redirectURL
func (*Config) SetRequest ¶
SetRequest 设置请求
func (*Config) SetVersion ¶ added in v0.0.8
SetVersion 设置 version
type Option ¶
type Option func(*options)
Option micro app option
func WithCacheKeyPrefix ¶ added in v0.0.7
WithCacheKeyPrefix set cacheKeyPrefix
func WithClientSecret ¶
WithClientSecret set clientSecret
func WithKeyVersion ¶ added in v0.0.9
WithKeyVersion set keyVersion
func WithPrivateKey ¶ added in v0.0.9
WithPrivateKey set privateKey
func WithPublicKey ¶ added in v0.0.9
WithPublicKey set publicKey
func WithRedirectURL ¶
WithRedirectURL set redirectURL