config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config Configuration information of the DouYin Open Platform

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 string) *Config

NewConfig new config

func (*Config) Cache

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

Cache 获取 cache

func (*Config) ClientKey

func (cfg *Config) ClientKey() string

ClientKey 获取 clientKey

func (*Config) ClientSecret

func (cfg *Config) ClientSecret() string

ClientSecret 获取 clientSecret

func (*Config) Logger

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

Logger 获取 logger

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) SetClientKey

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

SetClientKey 设置 clientKey

func (*Config) SetClientSecret

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

SetClientSecret 设置 clientSecret

func (*Config) SetLogger

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

SetLogger 设置日志

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

type Option

type Option func(*options)

Option micro app option

func WithClientKey

func WithClientKey(clientKey string) Option

WithClientKey set clientKey

func WithClientSecret

func WithClientSecret(clientSecret string) Option

WithClientSecret set clientSecret

func WithLogger

func WithLogger(logger logger.ILogger) Option

WithLogger set logger

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

Jump to

Keyboard shortcuts

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