config

package
v0.0.0-...-8015009 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

func BRH

func BRH(_ context.Context) string

BRH .

func ChannelKind

func ChannelKind(_ context.Context) string

ChannelKind .商户类型

func NoCardDiscID

func NoCardDiscID(_ context.Context) string

NoCardDiscID .无卡费率

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config 抖音开放平台的配置信息

func New

func New(ctx context.Context, opts ...Option) *Config

New create config

func NewConfig

func NewConfig(ctx context.Context, clientKey, clientSecret, redirectURL, scopes, salt, token string) *Config

NewConfig new config

func (*Config) Cache

func (cfg *Config) Cache() cache.Cache

Cache 获取 cache

func (*Config) CacheKeyPrefix

func (cfg *Config) CacheKeyPrefix() string

CacheKeyPrefix 获取 cacheKeyPrefix

func (*Config) ClientKey

func (cfg *Config) ClientKey() string

ClientKey 获取 clientKey

func (*Config) ClientSecret

func (cfg *Config) ClientSecret() string

ClientSecret 获取 clientSecret

func (*Config) KeyType

func (cfg *Config) KeyType() Secret

KeyType 获取 keyType

func (*Config) KeyVersion

func (cfg *Config) KeyVersion() int

KeyVersion 获取 keyVersion

func (*Config) Logger

func (cfg *Config) Logger() logger.ILogger

Logger 获取 logger

func (*Config) PrivateKey

func (cfg *Config) PrivateKey() string

PrivateKey 获取 privateKey

func (*Config) PublicKey

func (cfg *Config) PublicKey() string

PublicKey 获取 publicKey

func (*Config) RedirectURL

func (cfg *Config) RedirectURL() string

RedirectURL 获取 redirectURL

func (*Config) Request

func (cfg *Config) Request() request.Request

Request 获取 request

func (*Config) Salt

func (cfg *Config) Salt() string

Salt 获取 salt

func (*Config) Scopes

func (cfg *Config) Scopes() string

Scopes 获取 scopes

func (*Config) SetCache

func (cfg *Config) SetCache(cache cache.Cache) *Config

SetCache 设置缓存

func (*Config) SetCacheKeyPrefix

func (cfg *Config) SetCacheKeyPrefix(cacheKeyPrefix string) *Config

SetCacheKeyPrefix 设置 cacheKeyPrefix

func (*Config) SetClientKey

func (cfg *Config) SetClientKey(clientKey string) *Config

SetClientKey 设置 clientKey

func (*Config) SetClientSecret

func (cfg *Config) SetClientSecret(clientSecret string) *Config

SetClientSecret 设置 clientSecret

func (*Config) SetKeyType

func (cfg *Config) SetKeyType(keyType Secret) *Config

SetKeyType 设置 keyType

func (*Config) SetKeyVersion

func (cfg *Config) SetKeyVersion(keyVersion int) *Config

SetKeyVersion 设置 keyVersion

func (*Config) SetLogger

func (cfg *Config) SetLogger(logger logger.ILogger) *Config

SetLogger 设置日志

func (*Config) SetPrivateKey

func (cfg *Config) SetPrivateKey(privateKey string) *Config

SetPrivateKey 设置 privateKey

func (*Config) SetPublicKey

func (cfg *Config) SetPublicKey(publicKey string) *Config

SetPublicKey 设置 publicKey

func (*Config) SetRedirectURL

func (cfg *Config) SetRedirectURL(redirectURL string) *Config

SetRedirectURL 设置 redirectURL

func (*Config) SetRequest

func (cfg *Config) SetRequest(request request.Request) *Config

SetRequest 设置请求

func (*Config) SetSalt

func (cfg *Config) SetSalt(salt string) *Config

SetSalt 设置 salt

func (*Config) SetScopes

func (cfg *Config) SetScopes(scopes string) *Config

SetScopes 设置 scopes

func (*Config) SetToken

func (cfg *Config) SetToken(token string) *Config

SetToken 设置 token

func (*Config) SetVersion

func (cfg *Config) SetVersion(version string) *Config

SetVersion 设置 version

func (*Config) Token

func (cfg *Config) Token() string

Token 获取 token

func (*Config) Version

func (cfg *Config) Version() string

Version 获取 version

type Env

type Env struct {
}

Env parameter

func (*Env) AccountPartApply

func (e *Env) AccountPartApply(_ context.Context) string

AccountPartApply .申请分账

func (*Env) AccountPartQuery

func (e *Env) AccountPartQuery(_ context.Context) string

AccountPartQuery .查询分账

func (*Env) AccountQuery

func (e *Env) AccountQuery(_ context.Context) string

AccountQuery .

func (*Env) AccountRegister

func (e *Env) AccountRegister(_ context.Context) string

AccountRegister .

func (*Env) BindDevice

func (e *Env) BindDevice(_ context.Context) string

BindDevice .

func (*Env) CreateMerchant

func (e *Env) CreateMerchant(_ context.Context) string

CreateMerchant .

func (*Env) DownloadBillURL

func (e *Env) DownloadBillURL(_ context.Context) string

DownloadBillURL .下载账单地址

func (*Env) GetFileToken

func (e *Env) GetFileToken(_ context.Context) string

GetFileToken .

func (*Env) OrderChargeQuery

func (e *Env) OrderChargeQuery(_ context.Context) string

OrderChargeQuery .

func (*Env) PictureUpload

func (e *Env) PictureUpload(_ context.Context) string

PictureUpload .

func (*Env) QueryCertInfo

func (e *Env) QueryCertInfo(_ context.Context) string

QueryCertInfo .

func (*Env) QueryDeviceDetail

func (e *Env) QueryDeviceDetail(_ context.Context) string

QueryDeviceDetail .

func (*Env) QueryMerchant

func (e *Env) QueryMerchant(_ context.Context) string

QueryMerchant .

func (*Env) QueryStatus

func (e *Env) QueryStatus(_ context.Context) string

QueryStatus .

func (*Env) Refund

func (e *Env) Refund(_ context.Context) string

Refund .

func (*Env) RefundQuery

func (e *Env) RefundQuery(_ context.Context) string

RefundQuery .

func (*Env) UnbindDevice

func (e *Env) UnbindDevice(_ context.Context) string

UnbindDevice .

func (*Env) UnitedTrade

func (e *Env) UnitedTrade(_ context.Context) string

UnitedTrade 聚合下单

func (*Env) UploadFile

func (e *Env) UploadFile(_ context.Context) string

UploadFile .

func (*Env) UserAgent

func (e *Env) UserAgent(_ context.Context) string

UserAgent .

type Option

type Option func(*options)

Option micro app option

func WithCache

func WithCache(cache cache.Cache) Option

WithCache set cache

func WithCacheKeyPrefix

func WithCacheKeyPrefix(cacheKeyPrefix string) Option

WithCacheKeyPrefix set cacheKeyPrefix

func WithClientKey

func WithClientKey(clientKey string) Option

WithClientKey set clientKey

func WithClientSecret

func WithClientSecret(clientSecret string) Option

WithClientSecret set clientSecret

func WithKeyType

func WithKeyType(keyType Secret) Option

WithKeyType set keyType

func WithKeyVersion

func WithKeyVersion(keyVersion int) Option

WithKeyVersion set keyVersion

func WithLogger

func WithLogger(logger logger.ILogger) Option

WithLogger set logger

func WithPrivateKey

func WithPrivateKey(privateKey string) Option

WithPrivateKey set privateKey

func WithPublicKey

func WithPublicKey(publicKey string) Option

WithPublicKey set publicKey

func WithRedirectURL

func WithRedirectURL(redirectURL string) Option

WithRedirectURL set redirectURL

func WithRequest

func WithRequest(request request.Request) Option

WithRequest set request

func WithSalt

func WithSalt(salt string) Option

WithSalt set salt

func WithScopes

func WithScopes(scopes string) Option

WithScopes set scopes

func WithToken

func WithToken(token string) Option

WithToken set token

type Secret

type Secret uint

Secret defines the private key type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL