Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SDK ¶
type SDK struct {
// contains filtered or unexported fields
}
func New ¶
func New(apiKey, secretKey string, storage TokenStorage) *SDK
type TokenStorage ¶
type TokenStorage interface { Store(key, value string, ttl time.Duration) error Fetch(key string) (string, error) }
TokenStorage TOKEN持久化
func RedisStorage ¶
func RedisStorage(client *redigo.Client) TokenStorage
Click to show internal directories.
Click to hide internal directories.