Documentation ¶
Index ¶
- Constants
- func BRH(_ context.Context) string
- func ChannelKind(_ context.Context) string
- func NoCardDiscID(_ context.Context) string
- 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 Env
- func (e *Env) AccountPartApply(_ context.Context) string
- func (e *Env) AccountPartQuery(_ context.Context) string
- func (e *Env) AccountQuery(_ context.Context) string
- func (e *Env) AccountRegister(_ context.Context) string
- func (e *Env) BindDevice(_ context.Context) string
- func (e *Env) CreateMerchant(_ context.Context) string
- func (e *Env) DownloadBillURL(_ context.Context) string
- func (e *Env) GetFileToken(_ context.Context) string
- func (e *Env) OrderChargeQuery(_ context.Context) string
- func (e *Env) PictureUpload(_ context.Context) string
- func (e *Env) QueryCertInfo(_ context.Context) string
- func (e *Env) QueryDeviceDetail(_ context.Context) string
- func (e *Env) QueryMerchant(_ context.Context) string
- func (e *Env) QueryStatus(_ context.Context) string
- func (e *Env) Refund(_ context.Context) string
- func (e *Env) RefundQuery(_ context.Context) string
- func (e *Env) UnbindDevice(_ context.Context) string
- func (e *Env) UnitedTrade(_ context.Context) string
- func (e *Env) UploadFile(_ context.Context) string
- func (e *Env) UserAgent(_ context.Context) 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 ¶
View Source
const ( // PKCS1 is the private key type PKCS1 Secret = iota // PKCS8 is the private key type PKCS8 // CacheKeyPrefix 抖音 open cache key 前缀 CacheKeyPrefix = "iboxchain_open" // AccessTokenKey AccessToken Key AccessTokenKey = "accessTokenKey" )
Variables ¶
This section is empty.
Functions ¶
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 ¶
CacheKeyPrefix 获取 cacheKeyPrefix
func (*Config) SetCacheKeyPrefix ¶
SetCacheKeyPrefix 设置 cacheKeyPrefix
func (*Config) SetClientKey ¶
SetClientKey 设置 clientKey
func (*Config) SetClientSecret ¶
SetClientSecret 设置 clientSecret
func (*Config) SetKeyType ¶
SetKeyType 设置 keyType
func (*Config) SetKeyVersion ¶
SetKeyVersion 设置 keyVersion
func (*Config) SetPrivateKey ¶
SetPrivateKey 设置 privateKey
func (*Config) SetPublicKey ¶
SetPublicKey 设置 publicKey
func (*Config) SetRedirectURL ¶
SetRedirectURL 设置 redirectURL
func (*Config) SetRequest ¶
SetRequest 设置请求
func (*Config) SetVersion ¶
SetVersion 设置 version
type Env ¶
type Env struct { }
Env parameter
func (*Env) AccountPartApply ¶
AccountPartApply .申请分账
func (*Env) AccountPartQuery ¶
AccountPartQuery .查询分账
func (*Env) AccountRegister ¶
AccountRegister .
func (*Env) CreateMerchant ¶
CreateMerchant .
func (*Env) DownloadBillURL ¶
DownloadBillURL .下载账单地址
func (*Env) OrderChargeQuery ¶
OrderChargeQuery .
func (*Env) QueryDeviceDetail ¶
QueryDeviceDetail .
type Option ¶
type Option func(*options)
Option micro app option
func WithCacheKeyPrefix ¶
WithCacheKeyPrefix set cacheKeyPrefix
func WithClientSecret ¶
WithClientSecret set clientSecret
func WithRedirectURL ¶
WithRedirectURL set redirectURL
Click to show internal directories.
Click to hide internal directories.